Q96 Write a C Program to convert Celsius To Fahrenheit.

Conversion of Celsius to Fahrenheit

Celsius to Fahrenheit conversion formula is  given below

fah  =  (  cel  *  9.0  /  5.0  ) + 32

# include < stdio.h >
# include < conio.h >

int main()
{

/* Declaration Of Variables */
float cel, fah;

/* Input From User */
printf ( ” \n Enter Temperature in Celsius : ” );
scanf ( ” %f “, &cel );

fah  = (  cel  *  9.0  /  5.0  ) + 32;

/* Printing The Output */
printf ( ” \n Temperature in Fahrenheit :  %f  “,  f ah);
return 0;

}

Output :

$ ./a.exe
Enter Temp. In Celsius : 10 C
Temp. In Fahrenheit : 50 F

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.