fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main (void)
  4. {
  5. int m;
  6. scanf("%d",&m);
  7. printf("Input the month:%d\n",m);
  8.  
  9. if ((m>=1)&&(m<=12))
  10. {
  11. if ((m>2)&&(m<6))
  12. printf("it's spring.");
  13.  
  14. else if ((m>5)&&(m<9))
  15. printf("it's summer.");
  16.  
  17. else if ((m>8)&&(m<12))
  18. printf("it's autumn.");
  19.  
  20. else
  21. printf("it's winter.");
  22. }
  23. else
  24. printf("error.");
  25.  
  26. return 0;
  27.  
  28. }
Success #stdin #stdout 0s 5284KB
stdin
11
stdout
Input the month:11
it's autumn.