#include <stdio.h>
#include <ctype.h>
int main()
{
int a;
char select='y';
do
{
printf("Do you want to play again?(y or n)");
scanf("%c",select);
}
while(toupper(select)=='Y');
return 0;
}
为什么我输入y之后就直接结束程序了,而不是继续循环。