Showing posts with label Temperature conversion program in C. Show all posts
Showing posts with label Temperature conversion program in C. Show all posts

Saturday, 31 January 2015

Fahrenheit to Celsius Scale Conversion in C++

Structure of the Problem Requirements

The Program converts temperature from Fahrenheit Scale to Celsius Scale in C++ program. The Conversion formula is Celsius scale  = (Fahrenheit - 32 )*5/9 . The program will prompt to enter the temperature in Fahrenheit and then show the equal temperature in Celsius scale .

Source Code

#include<iostream>
using namespace std;
int main ()
{
cout<<"\t \t \t LEP Tutorials \n \n \n ";
float Fahrenheit,celsious;
cout<<" Temperature in Fahrenheit Scale : ";
cin>>Fahrenheit;
celsious = (Fahrenheit - 32)*5/9;
cout<<endl;
cout<<" Temperature in Celsius Scale : "<<celsious;
return 0;
}

Output of the Program

Fahrenheit to Celsius Scale Conversion in C++