Filled Under:

C Program to convert Celsius to Fahrenheit


C Program to convert Celsius to Fahrenheit



C Program to convert Celsius to Fahrenheit

In this case, I have discussed about the C Program to convert Celsius to Fahrenheit.

The relation between Celsius and Fahrenheit is,,
C/5= (F-32)/9
where C = Temperature in degree celsius  and
           F = Temperature in degree fahrenheit.

----------------------------------------------------------------------------------


#include<stdio.h>
void main()

float fah,cen;
printf("Enter the fahrenheit temerature:");
scanf("%f",&fah);
cen=(5*fah-160)/9;
printf("The celcius temperature is %f",cen);
}

---------------------------------------------------------

Just copy and paste the program in your desired compiler (Dev C++ is more preferable) and run it.


Enjoy programming in C.

0 comments:

Post a Comment

 

Copyright 2020 Programming in C All Right Reserved