王旭晨


私信TA

用户名:wxc

访问量:6559

签 名:

等  级
排  名 21231
经  验 636
参赛次数 0
文章发表 3
年  龄 0
在职情况 学生
学  校 陕西理工大学
专  业

  自我简介:

#include<stdio.h>

int main(){

float c,f;

printf("华氏温度:");

scanf("%f",&f);

c=5*(f-32)/9;

printf("摄氏温度:%.2f",c)


}

 

0.0分

3 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区

#include<stdio.h>

int main(){
	float F,c;
	scanf("%lf",&F);
	c=5*(F-32)/9;
	printf("c=%0.2f",c);
	
	return 0;
}    
 想问错哪了
2020-02-04 17:40:54
#include <stdio.h>
int main()
{
	float f;
    scanf("%f",&f);
    printf("c=%.2f",5*(f-32)/9);
	return 0;
}
2019-10-23 10:35:54
#include<stdio.h>
int main(void)
{
   float f,c;
   printf("please enter a fahrenheit tempreture!\n");
   /*请输入一个华氏温度*/
   scanf("%f",&f);
   c= 5*(f-32)/9;
   printf("c=%.2f\n",c);
   /*摄氏温度是*/

return 0;
}

为什么答案错误,求指点 !
2018-12-02 16:28:26
#include<stdio.h>
int main()
{
	double f,c;
	scanf("%lf",&f);
    c=5*(f-32)/9.0;
	printf("%.2lf\n",c);
	return 0;
}
2018-09-19 16:54:42
printf少了一个分号
2018-02-11 14:54:09
printf少了一个分号
2018-02-11 14:53:50
一般公式里整数不加小数点,不是会强制变为int形么
2017-10-24 16:18:19
第四行的分号打成了全角字符
倒数第二行的printf没有分号
结尾少个return 0;
把这些错误改正后,结果还不对.
2017-10-19 21:28:33