C Program to Convert Celsius to Fahrenheit

C Program to Convert Celsius to Fahrenheit

Write a Program to Convert Celsius to Fahrenheit

// C Program to Convert Celsius to Fahrenheit

#include <stdio.h>

int main()
{

    float fahr, cel;

    printf("Enter Temperature (C) :--> ");
    scanf("%f", &cel);

    fahr = (1.8 * cel) + 32.0; //temperature conversion formula
    printf("\nTemperature in Fahrenheit :--> %.2f F\n", fahr);

    return 0;

}

Output:

Enter Temperature (C) :--> 0

Temperature in Fahrenheit :--> 32.00 F