c语言 猜数字 用了直到型循环 编译显示system(“pause”)前出错,为什么?求指点~

c语言 猜数字 用了直到型循环 编译显示system(“pause”)前出错,为什么?求指点~
#include
#include
#include
main()
{
int key,number;//存放答案
printf("I have a number between 1 and 1000.\nCan you guess my number?\nPlease type your first try.");
key=1+(rand()%1000+1);

do{
scanf("%d",&number);

if(number-key>0)
{
printf("Too high.Try again.\nPlease type your next guess.\n");printf("type"); }

else if(number-key<0)
{
printf("Too low.Try again.\nPlease type your next guess.\n");
printf("type");
}

else
{printf("Excellent!You guessed the number!");
}
}while(number!=key)

system("pause");
return 0;
}
}while(number!=key)后面少了个分号,你仔细在pause前后找,一穗坦般就可以找到出御耐错的地方的。镇族春
while(number!=key)后面没加;
← 上一篇: 下一篇: →