#include<stdio.h> main() { float f,c; printf("2013914107输入一个数字 :"); scanf("%f",&f); c=5.0/9.0*(f-32);//c输出的数学公式 printf("the she shi wendu is: %.2f",c);//输出c的小数点后两位 }
总结:通过数学公式,输入一个数字可得出结果。