luc001.c (416B)
1 /* Temperature of a city in fahrenheit degrees is input through 2 the keyboard. WAP to convert this temperature into Centigrade 3 degrees. */ 4 /* Chapter 1; Page 19; Question NO.: F(a) */ 5 6 #include<stdio.h> 7 int main() { 8 float f, c; 9 printf("Enter the temperature of city in Fahrenheit : "); 10 scanf("%f", &f); 11 // formula (F - 32) 5/9 12 c = ((f - 32) * 5) / 9; 13 printf("\nTemperature in centigrade : %f", c); 14 return 0; 15 }