Saturday, May 9, 2015

Write a program to convert temperature into centigrade degrees

/* Temperature of a city in fahrenheit degrees in input through the keyboard. Write a program to convert this temperature into centigrade degrees. */

#include<stdio.h>
#include<conio.h>
main()
{
      float fr,cent;
      printf("Enter the temperature(F):");
      scanf("%f",&fr);
      cent=5.0/9.0*(fr-32);
      printf("\nTemperature in centigrade=%f",cent);
      printf("\n\n\n\n\n\nEnter any key for exit....");
      getch();
     
     
      }

Output :

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...