Assignments » Variable, Operator and Expression » Set1 » Solution 4

Write a program which accept temperature in Farenheit and print it in centigrade.

    
#include<iostream>
using namespace std;

int main()
{
	float F,C;
	cout<< "\nEnter temperature in Farenheit : ";
	cin>>F;
	C=5*(F-32)/9;
	cout<<"Temperature in celcius is : "<<C;
	
	
	return 0;
}

Enter temperature in Farenheit : 98.6
Temperature in celcius is : 37