You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
301 B
C++
15 lines
301 B
C++
5 years ago
|
Fahrenheit to celsius conversion
|
||
|
|
||
|
#include <iostream.h>
|
||
|
int main()
|
||
|
{
|
||
|
double fahr , celsius;
|
||
|
cout<<"Enter the temperature in degrees fahrenheit: ";
|
||
|
cin>>fahr;
|
||
|
//convert to celsius
|
||
|
celsius = (5.0 / 9.0) * (fahr - 32.0);
|
||
|
cout<<"The temperature in celsius is "<<celsius<<endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|