Home
User Guide
DB Recovery
Download
Documents
FAQ
Books
About Me
C Programs
Stats

/* 
   Program# 6 
   date : 10-12-2008
   Fahrenheit to centigrade 
*/

#include <stdio.h>
main(){
float c,f;
f=215.0;
c=(5.0/9.0)*(f-32);
printf("215.0 f equals : %.1f celsius\n",c);
}
output:
215.0 f equals : 101.7 celsius


Things to note: (f-32) will result in float.Because the integer value 32 is promoted to float as 32.0 and therefore the result is float.

Powered by
Open Source Programmers