#include<stdio.h>
#include<stdlib.h>
void main(){
char ch,sh;
again: randomize();
ch=random('z'-'a'+1)+'a';
printf("%c"ch);
scanf("%c"&sh);
if(sh!=ch)
goto again;
else printf("welcom");
getch();
}
网友评论1:
#include<stdio.h>
#include<stdlib.h>
void main()
{
char ch,sh;
again:int randomize();
ch==int random('z'-'a'+1)+'a';
printf(&quot;%c&quot;,ch);
scanf(&quot;%c&quot;,&sh);
if(sh!=ch)
goto again;
else printf(&quot;welcom&quot;);
int getch();
}
你再去试试!看看行不?