DIEGO PLASCENCIA A01229988
THIS PROGRAM IS USED TO TRANSFORM A TEMPERATURE GIVEN BY THE USER IN FAHRENHEIT TO CELCIUS AND KNOWING IF THE WATER WILL BOIL AT THAT TEMPERATURE.
#include <iostream>
using namespace std;
int main (void){
double t; // variable for temperature.
double r; // variable for the result.
cout<< “What is the temperature in Fahrenheit? “<< endl;
cin>> t;//user introduce the value in Fahrenheit.
r= (5*(t-32))/9; //formula
cout<< “A temperature of “<< t << “degrees Fahrenheit is” << r <<“in Celsius”<<endl;
if (r>=100){ //if r (temperature in celcius) is higher than 100, it will display that water will boil.
cout<< “Water boils at this temperature”<<endl;}
else{ //if r (temperature in celcius) is lower than 100, it will display that water will not boil.
cout<< “Water don’t boil at this temperature”<<endl;
}
}
TEMPERATURE by diego plascencia is licensed under a Creative Commons Attribution 4.0 International License.