Sunday, February 1, 2015
Fahrenheit to Celsius Conversion in C
#include <stdio.h>
int main (void)
{
double fahrenheit;
double celsius;
printf("Enter the temperature in degrees fahrenheit:\n");
scanf("%lf", &fahrenheit);
celsius = (5.0/9.0) * (fahrenheit-32);
printf ("The converted temperature is %lf\n", celsius);
return 0;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment