Answer to Question #274103 in C++ for Nick

Question #274103

The following program takes in temperature value in Celsius and converts it to Kelvin l. This code has many errors in it. Find the errors, list them, and correct the code.






int main ()





(









double C=0;. //declare input variable





cin>>d;. //retrieve temperature to input variable





double K=c+273.15;. //convert temperature





cout <<K>> '/n';. // print out temperature






)

1
Expert's answer
2021-12-01T10:57:12-0500
#include <iostream>

using namespace std;
int main()
{
    double C;           //declare input variable
    cin >> C;           //retrieve temperature to input variable
    double K = C + 273; //convert temperature
    cout << K << '/n';  // print out temperature
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment