fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. scanf("%d",&n);
  6. switch(n){
  7. case 1:
  8. case 2:
  9. case 3:
  10. case 4:
  11. case 5:
  12. case 6:
  13. case 7:
  14. case 8:
  15. case 9:
  16. case 10:
  17. printf("%d",n);
  18. break;
  19. case 11:
  20. printf("J\n");
  21. break;
  22. case 12:
  23. printf("Q\n");
  24. break;
  25. case 13:
  26. printf("K\n");
  27. break;
  28. default:
  29. printf("正確な値を入力してください");
  30. }
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 5320KB
stdin
18
stdout
正確な値を入力してください