while 的问题,老师们帮我看一下,错在哪里了?我是初学
#include "stdio.h"main()
{
int s1;
char s2;
char s3;
s3='y';
while (s3!='n')
{
printf("\n input chengji: ");
scanf ("%d",&s1);
if (s1<60) s2='E';
else if(s1<70) s2='D';
else if (s1<80) s2='c';
else if (s1<90) s2='B';
else s2='A';
printf("it is %c\n",s2);
printf("if it not needs go on>input: n \n");
scanf("%c",&s3);
printf("s3=%c\n",s3);
}
printf("end!\n");
}
发现: scanf("%c",&s3); 没被执行,不知道为什么?变为死loop了