Brijmohan lal Sahu - Facebook
ads
ads

Wednesday, October 29, 2014

Fahrenheit to Celsius Converter in C++

Temperature Converter 


/*Program to convert Fahrenheit to Celsius */
#include<conio.h>
#include<iostream.h>
void main()
{
float c,f;
char ch;
clrscr();
cout<<"\n\tTEMPERATURE CONVERTER \n\t[Fahrenheit to Celsius]";
do
{
cout<<"\n\tEnter tempretur in F:";
cin>>f;
c=((f-32)*5)/9;
cout<<"\n\t----------------------------------";
cout<<"\n\tF="<<f<<"  equals to  C="<<c;
cout<<"\n\t----------------------------------";
cout<<"\n\n\tEnter Y/y for more & N/n for exit :";
cin>>ch;
}while(ch=='Y' || ch=='y');
getch();
}

No comments:

Post a Comment