#include<stdio.h>
int main()
{
float a,b,c,d;
float temp;
scanf("%f %f %f %f, &a, &b, &c, &d);
temp=a
if(temp<b)
temp=b;
if(temp<c)
temp=c;
if(temp<d)
temp=d;
printf("\nmax=%f",temp);
return 0;
}
error C2146: syntax error : missing ´)´ before identifier temp
error C2001: newline in constant
我实在是不懂啦!各位大神!
error C2001: newline in constant
答案:1 悬赏:0
解决时间 2021-03-08 14:05
- 提问者网友:小姐请专情
- 2021-03-07 17:14
最佳答案
- 二级知识专家网友:走,耍流氓去
- 2021-03-07 18:28
#include<stdio.h>
int main()
{
float a,b,c,d;
float temp;
scanf("%f %f %f %f", &a, &b, &c, &d);//这里有修改,少了一个"
temp=a;//这里少了一个分号
if(temp<b)
temp=b;
if(temp<c)
temp=c;
if(temp<d)
temp=d;
printf("\nmax=%f",temp);
return 0;
}
int main()
{
float a,b,c,d;
float temp;
scanf("%f %f %f %f", &a, &b, &c, &d);//这里有修改,少了一个"
temp=a;//这里少了一个分号
if(temp<b)
temp=b;
if(temp<c)
temp=c;
if(temp<d)
temp=d;
printf("\nmax=%f",temp);
return 0;
}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯