codescracker


c++

C++ Program to Convert Centigrade to Fahrenheit



« Previous Program Next Program »


Centigrade to Fahrenheit Conversion in C++

To convert temperature from centigrade to Fahrenheit in C++ Programming, you have to ask to the user to enter the temperature in centigrade to convert it into Fahrenheit (using fah = (1.8 * cen) + 32) to display the equivalent temperature in Fahrenheit

C++ Programming Code to Convert Centigrade to Fahrenheit

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

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

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

C++ program convert temperature Celsius to Fahrenheit

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