c program to Convert temperature from centigrade to Fahrenheit.| temperature conversion program in C
Description :
To convert Centigrade to Fahrenheit, multiply by 1.8 and add 32 degrees.
Algorithm:
Step 1 : start
Step 2 : read temperature in centigrade
Step 3 : calculate Fahrenheit = 32 + (centigrade * (1.8));
Step 4 : display centigrade and Fahrenheit
Step 5 : stop.
Flow chart :
Program :
-
#include<stdio.h>
-
int main ()
-
{
-
float temp_c, temp_f;
-
printf (“Enter the value of Temperature in Celcius: “);
-
scanf (“%f”, &temp_c);
-
temp_f = (1.8 * temp_c) + 32;
-
printf (“The Temperature in Fahreinheit is: %f”, temp_f);
-
return 0;
-
}
Related Programs :
C program to understand type conversation.
finding Largest of two numbers using conditional operator in C.
C program to calculate the simple Interest,
100 + More C programs
2 Responses
[…] C program to Convert temperature from centigrade to Fahrenheit […]
[…] C program to Convert temperature from centigrade to Fahrenheit […]