Temperature

This code converts Fahrenheit degrees to Celsius and tells you if at that temperature the water boils or not.wsq02

If you want to make improvements or modifications, here is the code for you to copy and paste it anywhere.

#include <iostream>
using namespace std;

int dgf, dgc;

int main (){
cout <<“Type in degrees in Farenheit”<< endl;
cin >> dgf;
dgc= 5*(dgf-32)/9;

if (dgc>=100) {
cout << dgf <<” degrees Farenheit are “<< dgc <<” degrees in Celsius”<< endl;
cout << “Water usually boils at this temperature”<<endl;
}
else {
cout << dgf <<” degrees Farenheit are “<< dgc <<” degrees in Celsius”<< endl;
cout << “Water usually not boils at this temperature”<< endl;
}
return 0;
}

Leave a comment