Write a program to compute Fahrenheit from centigrade (f=1.8*c +32)
#include<stdio.h>
int main()
{
float celcius, fahrenheit;
printf("\nEnter temp in Celcius : ");
scanf("%f", &celcius);
fahrenheit = (1.8 * celcius) + 32;
printf("\nTemperature in Fahrenheit : %f ", fahrenheit);
return (0);
}
int main()
{
float celcius, fahrenheit;
printf("\nEnter temp in Celcius : ");
scanf("%f", &celcius);
fahrenheit = (1.8 * celcius) + 32;
printf("\nTemperature in Fahrenheit : %f ", fahrenheit);
return (0);
}
Comments
Post a Comment