fork(1) download
  1. #include <stdio.h>
  2. int main(void) {
  3. char ch;
  4. scanf("%c",&ch);
  5. if((ch>='0')&&(ch<='9'))
  6. printf("这是一个数字字符");
  7. else if((ch>='a')&&(ch<='z'))
  8. printf("这是一个小写字母");
  9. else if((ch>='A')&&(ch<='Z'))
  10. printf("这是一个大写字母");
  11. else if(ch == ' ')
  12. printf("这是一个空格");
  13. else
  14. printf("这是其它字符");
  15. return 0;
  16. }
Success #stdin #stdout 0s 5320KB
stdin
8
stdout
这是一个数字字符