Sunday, 15 March 2015

To convert temperature in centigrade to farenheit Using C

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

void main()
{
float c, f ;
clrscr() ;
printf("Enter the centigrade : ") ;
scanf("%f", &c) ;
f = (1.8 * c + 32) ;
printf("\nThe farenheit is : %.2f", f) ;
getch() ;
}

RUN 1 :
~~~~~~~
Enter the centigrade : 45
The farenheit is : 113.00

No comments:

Post a Comment