Thursday, 21 August 2014

Filled Under: ,

C program to convert celsius to fahrenheit

Share

Here is a simple C program to convert celsius to fahrenheit is given ,which takes celsius value as input and after execution it will print the fahrenheit value which is equivalent to the given celsius value.This program uses a physics formula to convert celsius to fahrenheit.

C program to convert celsius 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
Temperature in Fahrenheit : 89.59998