For Advertisements on this blog Contact Us at developgram@gmail.com or +91-9923438816

Simple Programming Tutorials For Beginners

Sunday, December 11, 2016

Temperature Converter

/*
Summary: Converts temperature from fahrenheit to degree celcius
*/

#include <stdio.h>
int main ()
{

 int fahrenheit;
 double celsius;

 printf("Enter the temperature in degrees fahrenheit:");
 scanf("%d", &fahrenheit);
 celsius = (5.0/9.0) * (fahrenheit-32);
 printf ("The converted temperature is %lf\n", celsius);

 return 0;

}

No comments:

Post a Comment

SEARCH THIS BLOG