(d) Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees.

Let Us C by Yashwant Kanetkar

 
Solution By Muhammad Kaleem UIlah



                                                                  Exercise Questions 
[H] Write C programs for the following:
(d) Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees.

#include <stdio.h>

#include <stdlib.h>

int main()

{

    float centigrade_degrees,fahrenheit;

    printf("\n\t\t Enter The Temperature in Fahrenheit = ");

    scanf("%f",&fahrenheit);

    centigrade_degrees = (fahrenheit-32)*5/9;

    printf("\n\t\t Temperature in Centigrade =                         %f",centigrade_degrees);

    return 0;

}

Comments

Popular posts from this blog

EXERCISE 01 Complete Solved LET US C by Yashwant Kanetkar

(j) In a town, the percentage of men is 52. The percentage of total literacy is 48. If total percentage of literate men is 35 of the total population, write a program to find the total number of illiterate men and women if the population of the town is 80,000.