盐和避难所安卓:为什么这个程序编译的时候会说 语句缺省呢 请高手指教
来源:百度文库 编辑:杭州交通信息网 时间:2024/06/06 03:10:51
#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);
}
}
#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;返回。
为什么这个程序编译的时候会说 语句缺省呢 请高手指教
我的系统为什么会自动运行这个程序呢?
为什么我用vc编程只能编译而不能运行,一点go的时候就会出现一个对话框,说什么文件不存在是什么意思啊
为什么瑞星会不断提示缺省的GJammer Trojanj
为什么瑞星会不断提示缺省的GJammer Trojanj
编程的时候有时候会出现编译没有错误而连接错误,这时该怎么办呢?
请问编译正确的程序为什么会在运行时出错?
为什么一打开电脑的时候就会弹出一个对话框说:加载不了程序。。。。。。。
为什么我在turboc 2.0下编译的程序在windows xp下不能运行呢?
登陆传奇世界私服的时候为什么总说客户端程序未被发现呢!!!!