Friday, 30 March 2012

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

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<conio.h>
void main(void)
{
float fahr, centi;
printf("Please enter temperature in Fahrenheit : ");
scanf("%f", &fahr);
centi=5.0*(fahr-32.0)/9.0;
printf("The temperature in Centigrade would be %f", centi);
getch();
}




9 comments:

  1. Great Blog I Have Read Your Blog It Is Very Interesting And useful For Computer Science Thank You For Posting And Sharing With Us useful Post.
    Final Year Project For Computer Science.

    ReplyDelete
  2. Why the first output is wrong and how u change it to right?

    ReplyDelete
  3. Hello my loved one! I wish to say that this article is amazing, nice written and include almost all vital infos. I would like to look more posts like this . IT Support Northampton

    ReplyDelete