这一句循环看不懂!
#include <stdio.h>#include <ctype.h>
int main(void)
{
char ch;
printf("please type in a letter: type # to end my act.\n");
while((ch = getchar()) != '#')
{
if('\n' == ch)
continue;
if(islower(ch))
switch(ch)
{
case 'a':
printf("argali\n");
break;
case 'b':
printf("babirusa\n");
break;
case 'c':
printf("coati\n");
break;
case 'd':
printf("desman\n");
break;
case 'e':
printf("echidna\n");
break;
case 'f':
printf("fisher\n");
break;
default:
printf("That's a stumper!\n");
}
else
printf("I recognize only lowercase letters.\n");
while(getchar() != '\n')
continue;
printf("Please type another letter or a #.\n");
}
printf("Bye!\n");
getchar();
getchar();
return 0;
}
红色循环这里看不懂,怎么处理的字符,能不能把程序运行的详细过程说一下~~谢谢!