Sunday 15 March 2015

To convert temperature in farenheit to centigrade Using C

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

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

RUN 1 :
~~~~~~~
Enter the farenheit : 113
The centigrade is : 45.00

No comments:

Post a Comment