codescracker


c

C Program to Convert Centigrade to Fahrenheit



« Previous Program Next Program »


Centigrade to Fahrenheit Conversion in C

To convert centigrade temperature to Fahrenheit temperature in C programming, you have to ask to the user to enter the temperature in centigrade to convert it into Fahrenheit to display the equivalent temperature in Fahrenheit

C Programming Code to Convert Centigrade to Fahrenheit

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

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

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

c program convert centigrade to fahrenheit

Same Program in Other Programming Language

You may also like same program in other programming languages:


« Previous Program Next Program »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test