loading请求处理中...
10大优享服务
62项会员特权

编写一程序如何实现以下功能

问题补充:输入一个华氏温度,要求输出摄氏温度,计算公式为c=5(F-32)/9。编程可用素材:printf("Input the degree: ")、printf("nF(…)=C(…)…。

 程序的运行效果应类似地如图所示,图中的120是从键盘输入的内容。 

程序开发

提问者:效果图表现 3回答 浏览次数:2656 提问时间: 2021/12/01 11:35
提问者采纳
程序:

#include
int main()
{
float f,c;
printf("Input the degree: ");
scanf("%f", &f);
c=5.0*(f-32.0)/9.0;
printf("nF(%.2f)=C(%.2f)",f,c);
return 0;

}
2021/12/01 11:43
评论(0) 向他提问

全部回答

  • ★色彩==精灵★ 2021/12/01 11:45
    #include
    int main()
    {
    float t;
    printf("Input the degree: ");
    scanf("%f", &t);
    printf("nF(%.2f)=C(%.2f)n", t, 5*(t-32)/9);
    }
  • 客儿的店铺 2021/12/01 11:46
    #include
    int main()
    {
    printf("Input the degree: ");
    double f;
    scanf("%lf", &f);
    double c=5*(f-32)/9;
    printf("nF(%.2f)=C(%.2f)n", f, c);
    return 1;
    }

问题分类

我 要 回 答 我 要 提 问
问题分类   验证码 换一组