#include <stdio.h>

int main() { float celsius, fahrenheit;

printf("请输入摄氏温度:");
scanf("%f", &celsius);

fahrenheit = (celsius * 9 / 5) + 32;

printf("华氏温度为:%.2f\n", fahrenheit);

return 0;

}

1请编写一个C语言程序完成华氏温度与摄氏温度的转化。要求输入一个摄氏温度能得到对应的华氏温度值。华氏温度与摄氏温度的转换公式是c=59f-32

原文地址: https://www.cveoy.top/t/topic/fKov 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录