CProgram

Convert temperature from degree centigrade to Fahrenheit

Write a C program to convert temperature from degrees Centigrade to Fahrenheit.

#include<stdio.h>
int main() {
float celsius, fahrenheit;
printf(“\nEnter temp in Celsius : “);
scanf(“%f”, &celsius);
fahrenheit = (1.8 * celsius) + 32;
printf(“\nTemperature in Fahrenheit : %f “, fahrenheit);
return (0);
}
Output:
Enter temp in Celsius: 32
The temperature in Fahrenheit: 89.59998

What's your reaction?

Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0

You may also like

Leave a reply

Your email address will not be published.

More in:C