CodeGrabber
{ USER }
posts: 23
last: 28-Apr-2008
TITLE: Fahrenheit to celsius conversion
DESCRIPTION: Coverting Degrees F to Degrees C
Submitted: 09-Apr-2008 08:00:09 ( 21w 5d 2h ago ) Language: C++ (*.cpp *.h)
Views: 231 Lines of Code: 20 LINES
Rating:
rate: star1
star2
star3
star4
star5
dstar1
dstar2
dstar3
dstar4
dstar5  ( rated! )
  { 0.00 / 5 }
Difficulty: Beginner
Bookmark
/* Author: CodeGrabber
   Date: 09-04-2008
   Filename: 
   Description: Fahrenheit to celsius conversion
   History: 
*/


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