Pages

Monday, 5 March 2018

Write a C++ program that will ask for a temperature in Fahrenheit and display it in Celsius in C++ Programming Language.


Write a C++ program that will ask for a temperature in Fahrenheit and display it in Celsius.

#include<conio.h>
#include<iostream.h>
void main()
{
float f,c;
clrscr();
cout<<"Enter Fahrenheit degree to find temperature in celsius: ";
cin>>f;
c = (f-32)/1.8;
cout<<"\n\n\tCELSIUS DEGREE = "<<c;
getch();
}