c=(f-32)*5/9;printf("它的摄氏温度为:%.2f",c);}
include<stdio.h>intmain(){doublec,f;printf("请输入华氏温度:");scanf("%lf",&f);c=5.0/9*(f-32);printf("%g华氏温度是%.2f摄氏温度\n",f,c);return0;...
公式:C=5.0/9.0*(F-32);include<stdio.h>voidmain(){floatC,F;printf(“InputF:”);scanf("%f",&F);//输入华氏度C=5.0/9.0*(F-32);//换算公式printf(“C=%f\n”,C);//输出结果}...
可以参考下面的代码:include<stdio.h>intmain(void){floatc,f;printf("请输入一个华氏温度:\n");scanf("%f",&f);c=(f-32)*5/9;printf("对应的摄氏温度是:%.2f\n",c);}...
c语言输入一个华氏温度,输出摄氏温度公式为c=5/9(f-32)。123456789#include<stdio.h>main(){floatf,c;printf("pleaseenterF:");scanf("%f",&f);c=5.0*(f-32.0)/9.0printf("%f",c);}C语言:...
include<stdio.h>main(){doublef;while(1){scanf("%lf",&f);printf("celsiws=%.2lf\n",5.0/9.0*(f-32));}}如图所示,望采纳。。。
第一段代码,首先计算5/9这个值你可以试一试,在c语言中他的值为0,然后0*后面的自然是0.第二个由于你写的是5.0/9.0所以可以往后精确,算出来的数就不会是0,*后面的式子也就不会得0.。。。哦,5.0/9.0...
=(e-273.15)℃=[1.80×(e-273.15)+32]℉=(9/5)e°R摄氏温度与华氏温度的最典型的换算式是:5(x ºF-50)=9(yºC-10)其中x代表华氏温度的值,y代表摄氏温度的值。
include<stdio.h>intmain(){intf,c;scanf("%d",&f);c=5*(f-32)/9;printf("Celsius=%d",c);return0;}
include<stdio.h>floatchange(floatx);voidmain(){floatfahr;printf("请输入摄氏温度:");scanf("%f",&fahr);printf("\n对应的华氏温度为:%.1f\n\n",change(fahr));}floatchange(floatx){float.