作业帮 > 综合 > 作业

#includevoid main(){int magic=68,a,b,c;printf("Please input

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 01:46:46
#include
void main()
{
int magic=68,a,b,c;
printf("Please input a number:");
scanf("%d",&a);
if(a!=magic)
scanf("%d",&b);
if(b!=magic)
printf("Wrong!\n");
scanf("%d",&c);
if(c==magic)
printf("Right!\n");
else if(c>=magic)
printf("Too high!\n");
else
printf("Too low!\n");
else
printf("Right!\n");
else
printf("Right!\n");
}
#includevoid main(){int magic=68,a,b,c;printf(
#include
void main()
{
int magic=68,a,b,c;
printf("Please input a number:");
scanf("%d",&a);
if(a!=magic)
scanf("%d",&b);
if(b!=magic)
printf("Wrong!\n");
scanf("%d",&c);
if(c==magic)
printf("Right!\n");
else if(c>=magic)
printf("Too high!\n");
else
printf("Too low!\n");
/*else
printf("Right!\n");
else
printf("Right!\n");*/
}
还是看不明白你的程序是什么意思,不过错误在于最下面的两个else没有配对的if,所以会出现错误,注释掉就可以了,你可以把自己程序的意思表达一下,然后再修改.