meili 发表于 2022-10-27 15:26:27

输入一个摄氏温度,要求输出华氏温度.公式为f=5/9*c+32.(保留1位小数).示例:输入:11.1输出:38.2voidmain(){doublec;scanf(quot;%lfquot;,amp;c);printf(quot;%.1fquot;,5.0/9*c+32);}#include请问.这里ptintf中,5.0换成5可以么另

<p>问题:输入一个摄氏温度,要求输出华氏温度.公式为f=5/9*c+32.(保留1位小数).示例:输入:11.1输出:38.2voidmain(){doublec;scanf(quot;%lfquot;,amp;c);printf(quot;%.1fquot;,5.0/9*c+32);}#include请问.这里ptintf中,5.0换成5可以么另
<p>答案:↓↓↓<p class="nav-title mt10" style="border-top:1px solid #ccc;padding-top: 10px;">田鹤立的回答:<div class="content-b">网友采纳  5.0不能换成5,否则5/9=0  可用float,相应改为  floatc;  scanf("%f",&c);
页: [1]
查看完整版本: 输入一个摄氏温度,要求输出华氏温度.公式为f=5/9*c+32.(保留1位小数).示例:输入:11.1输出:38.2voidmain(){doublec;scanf(quot;%lfquot;,amp;c);printf(quot;%.1fquot;,5.0/9*c+32);}#include请问.这里ptintf中,5.0换成5可以么另