三星ks8800屏幕:为什么这个程序编译的时候会说 语句缺省呢 请高手指教

来源:百度文库 编辑:高考问答 时间:2024/05/13 05:35:23
#include "stdio.h"
#include "stdlib.h"
#include "ctype.h"
main()
{
int count,
number,
guess;
char yes ='Y';
printf("\n Now let us play the game.\n Guess the number:");
whlie(toupper(yes)=='Y')
{
count=0;
randomize();
munber=random(100)+1;
do{
do{
printf("\n Input an integer number(1-100):");
scanf("%d",&guess);
}while(!(guess>=1&&guess<=100));
if(guess<number)
printf("\n Your answer is LOW ,try again.");
if(guess>number)
printf("\n Your answer is HIGH ,try again:");
count++;
if(count==15)
{
printf("\n Thia is the %d times!Think it hard next!");
exit(0);
}
}while(!(guess==number))
If(count<=7)
{
printf("\n You have got it in %d times.\n",count);
printf("\nCongretulations!");
}
else
{
printf("\n You got it in %d times.\n",count);
printf("\n I bet you can do it better");
}
printf("\n NEXT?(Y/N):");
scanf("%c",&yes);
}
}

main()没有返回值
原型中返回的是int型
试着改为int main(void)
后加return 1;返回。