fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int n;
  6.  
  7. scanf("%d",&n);
  8. switch(n){
  9. case 1:
  10. case 3:
  11. case 5:
  12. case 7:
  13. case 8:
  14. case 10:
  15. case 12:
  16. printf("大の月です");
  17. break;
  18. case 4:
  19. case 6:
  20. case 9:
  21. case 11:
  22. printf("小の月です");
  23. break;
  24. case 2:
  25. printf("29日まであります");
  26. break;
  27. default:
  28. printf("そんな月はありません");
  29.  
  30. }
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 5324KB
stdin
5
stdout
大の月です