4 - WAP that accepts the temperature in Centigrade and converts into Fahrenheit using the formula C/5=(F-32)/9.
نشرت بواسطة:NAYI Pathshala
November 18, 2018
في
لاتوجد تعليقات
WAP that accepts the temperature in Centigrade and converts into Fahrenheit using the formula C/5=(F-32)/9.
int main() {
float celsius, fahrenheit;
printf("\nEnter temp in Celsius : ");
scanf("%f", &celsius);
fahrenheit = (1.8 * celsius) + 32;
printf("\nTemperature in Fahrenheit : %f ", fahrenheit);
return (0);
}
Output
Enter temp in Celsius : 32
Temperature in Fahrenheit : 89.59998
No comments:
Post a Comment