codescracker


c++

C++ Program to Convert Fahrenheit to Centigrade



« Previous Program Next Program »


Fahrenheit to Centigrade Conversion in C++

To convert temperature from Fahrenheit to centigrade in C++ programming, you have to ask to the user to enter the temperature in Fahrenheit to convert it into centigrade to display the equivalent temperature value in centigrade as shown here in the following program.

C++ Programming Code to Convert Fahrenheit to Centigrade

Following C++ program ask to the user to enter temperature in Fahrenheit to convert it into Celsius, then display the result on the screen:

/* C++ Program - Fahrenheit to Centigrade Conversion */
		
#include<iostream.h>
#include<conio.h>
void main()
{
	clrscr();
	float fah, cel;
	cout<<"Enter temperature in Fahrenheit : ";
	cin>>fah;
	cel=(fah-32) / 1.8;
	cout<<"Temperature in Celsius = "<<cel;
	getch();
}

When the above C++ program is compile and executed, it will produce the following result:

C++ program convert temperature Fahrenheit to Celsius

Same Program in Other Language

You may like the same program in other programming languages:


« Previous Program Next Program »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test