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 04:40
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
question
Computers and Technology, 22.06.2019 06:30
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
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, 06.08.2021 01:10
question
Mathematics, 06.08.2021 01:10
Questions on the website: 13722367