已知华氏温度到摄氏温度的转换公式为:摄氏温度= (华氏温度- 32)×5/9,写程序将给定的华氏温度转换为摄氏温度输出
#include <stdio.h> float to_celsius(float f) { return (f - 32) * 5 / 9; } int main() { float f; scanf("%f", &f); printf("%.1f", to_celsius(f)); return 0; }