Fahrenheit to celsius conversion

Submitted by:Jhon Jhon

Date added:27 July, 2013

Category:C++

C++ source code for Fahrenheit to celsius conversion

Tags: celsius conversion

Code Snippet:

#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;
}
 
 

Comments