电脑c语言编程入门 c语言编程中怎么将华氏温度转换成摄氏温度?
c语言编程中怎么将华氏温度转换成摄氏温度?#Includeintmain(){floatf,Cwhile(1){printf(“please input Fahrenheit temperature:
c语言编程中怎么将华氏温度转换成摄氏温度?
#Include
intmain()
{
floatf,C
while(1)
{
printf(“please input Fahrenheit temperature:”)
scanf(%f”,&F)
C=5*(f-32)/9
printf(“centrice temperature is%0.2f”,C)
return 0
}
如何编写一个华氏摄氏度与摄氏温度之间的C语言转换程序?
c语言编程,将华氏温度转换成摄氏温度。转换公式为:c=5/9 * (f-32),其中?
用这个程序,我们可以实现#include<stdio。H>floatchange(floatx)void main(){floatfahrprintf(“请输入摄氏温度:”)scanf(%f”,&fahr)printf(“”),对应的华氏温度:%。1Fnn,change(Fahr))}floatchange(floatx){floatcent=x*9/5 32return}