|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
#include<ctype.h>
int main(void)
{
char another_game == 'Y';
const unsigned int DELAY=1;
printf("\nTo play Simple Simon,");
printf("watch the screen for a sequence of digits.");
printf("\nWatch carefully,as the digits are only displayed for %u second%s",DELAY,DELAY>1?"s!":"!");
printf("\nThe computer will remove them,and then prompt you");
printf("to enter the same sequence.");
printf("\nWhen you do,you must put spaces between the digits.\n");
printf("\nGood luck!\nPress Enter to play\n");
scanf("%c",&another_game);
do
{
printf("\nDo you want to play again (y\n)?");
scanf("%c",&another_game);
}
while (toupper(another_game)=='Y');
return 0;
}
D:\vc\MSDev98\MyProjects\simon\simonyx.c(5) : error C2143: syntax error : missing ';' before '=='
D:\vc\MSDev98\MyProjects\simon\simonyx.c(6) : error C2143: syntax error : missing ';' before 'const'
D:\vc\MSDev98\MyProjects\simon\simonyx.c(9) : error C2065: 'DELAY' : undeclared identifier
Error executing cl.exe.
没有丢‘;’,为什么报错啊???
|
|