Write a program for converting temperature from degrees Celsius to degrees Fahrenheit, given the formula:
F = C x 95 + 32
#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;
}
Comments
Leave a comment