fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int month;
  5. scanf("%d",&month);
  6.  
  7. if(3<=month&&month<=5){
  8. printf("春です");
  9. }
  10. else if(6<=month&&month<=8){
  11. printf("夏です");
  12. }
  13. else if(9<=month&&month<=11){
  14. printf("秋です");
  15. }
  16. else if(12<=month&&month<=2){
  17. printf("冬です");
  18. }
  19. else if(month<1||month>12){
  20. printf("そんな月はありません");
  21.  
  22. }
  23.  
  24.  
  25.  
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 5320KB
stdin
6
stdout
夏です