AnkitWebLogic

C Program | Celsius to Fahrenheit

Q10. WAP to convert temperature from Celsius to Fahrenheit. (Hint: f=c*9/5+32) 1

#include<stdio.h>
int main()
{
    float c, f;
    printf("Enter temperature in Celsius:");
    scanf("%f",&c);
    f=c*9/5+32;
    printf("Temperature in Fahrenheit = %.2f",f);
    return 0;
}
Enter temperature in Celsius: 37
Temperature in Fahrenheit = 98.60