fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. char ch;
  6. scanf("%c",&ch);
  7. if((ch>='0')&&(ch<='9'))
  8. {
  9. printf("这是一个数字字符");
  10. }
  11. else if((ch>='a')&&(ch<='z'))
  12. {
  13. printf("这是一个小写字母");
  14. }
  15. else if((ch>='A')&&(ch<='Z'))
  16. {
  17. printf("这是一个大写字母");
  18. }
  19. else if(ch==' ')
  20. {
  21. printf("这是一个空格");
  22. }
  23. else
  24. {
  25. printf("这是其它字符");
  26.  
  27. }
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0s 5292KB
stdin
6
stdout
这是一个数字字符