【time z】...time(NULL));m=rand()& 'A';do{printf(猜A~Z的...
网友回答
【答案】 这样写就可以了
#include stdio.h
#include time.h
#include stdlib.h
void main()
{
char guess,m;
int count=0;
srand((unsigned)time(NULL));
m=rand()%26+'A';
do
{
printf(猜A~Z的字符\n);
fflush(stdin);
scanf(%c,&guess);
if(guess 'Z')
{
printf(输的数没A~Z的在范围内\n);
continue;
}
if(guess > m)
{
printf(猜大了);
continue;
}
if(guess