subject

The following is an attempt to display a table of Celsius temperatures and their Fahrenheit equivalents in the range 0 to 20. int celsius;
for ( celsius = 0; celsius <= 20; celsius =+ 1 );
{
double f = 9 / 5 * celsius + 32;
cout << celsius << " C == "
<< f << " Fahrenhiet "
<< endl;
}

Although this code compiles without complaint, it has more than one mistake. Pick the answer that correctly identifies a mistake with the use of the C++ iteration statement.

A. The double variable f must be declared prior to the for loop.
B.
The correct for loop header for this iteration is,
for ( celsius = 0; celsius < 20; celsius =+ 1 )
C.
Remove the semicolon from the line with the for loop header.
D.
The statement that computes the equivalent temperature in Fahrenheit is wrong. It should be the following,

double f = 9.0 / 5.0 * celsius + 32;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
The salespeople at hyperactive media sales all use laptop computers so they can take data with them on the road. you are a salesperson for superduper lightspeed computers talking to hyperactive media sales about upgrading the laptops to windows 10. explain how network location awareness in windows 10 would make the laptops more secure.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
When early motion pictures played in movie theaters, they were often accompanied by live organ or piano music. which of the following are the most likely reasons that this happened? (select all that apply). the music was provided to distract audience members from the loud sounds made when filmstrips were changed. the music accompanied the movies because the movies were silent and audiences were used to hearing music during plays in theaters. the music usually was played before, and sometimes after the movie, as an alternative form of entertainment. the music viewers to interpret the dramatic action in the films.
Answers: 2
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
You know the right answer?
The following is an attempt to display a table of Celsius temperatures and their Fahrenheit equivale...
Questions
question
Mathematics, 18.12.2019 21:31
question
Physics, 18.12.2019 21:31
question
Mathematics, 18.12.2019 21:31
question
Mathematics, 18.12.2019 21:31
Questions on the website: 13722363