Question #308217

Write a program for converting temperature from degrees Celsius to degrees Fahrenheit, given the formula:

F = C x 95 + 32


Expert's answer

#include <stdio.h>

int main() {
    double C, F;

    printf("Enter a temeperature in C: ");
    scanf("%lf", &C);
    F = C * 9.0/5.0 + 32.0;
    printf("%.2lf C = %.2lf F\n", C, F);

    return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS