循环选择结构
不管怎么输出都带一个 other char#include <stdio.h>
int main(void)
{
char ch;
while(ch != '@',ch = getchar())
{
if(ch >= 'a' && ch <= 'z')
printf("lowercase\n");
else
if(ch >= 'A' && ch <= 'Z')
printf("uppercase\n");
else
if(ch >= '0' && ch <= '9')
printf("digital\n");
else
printf("other char\n");
}
return 0;
}
j
lowercase
other char