#includevoid 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");elseprintf("Too low!

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 15:57:26
#includevoidmain(){intmagic=68,a,b,c;printf("Pleaseinputanumber:");scanf("%d",&a);if(a!=magic)scanf(

#includevoid 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");elseprintf("Too low!
#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("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");elseprintf("Too low!
#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,所以会出现错误,注释掉就可以了,你可以把自己程序的意思表达一下,然后再修改.