Convert Celsius to Fahrenheit with C language
#include <stdio.h>
int main()
{
double celsius, fahrenheit;
printf("\nEnter Temperature in Celsius : ");
scanf("%lf", &celsius);
/*fahrenheit = (9/5*celsius)=32 */
fahrenheit = (1.8 * celsius) + 32;
printf("\nTemperature in Fahrenheit : %.2lf ", fahrenheit);
return 0;
}
Enter Temperature in Celsius: 90
Temperature in Fahrenheit: 194.00
0 Comments