fork download
  1. import java.util.*;
  2.  
  3. class Task2
  4. {
  5. public static void main (String[] args)
  6. {
  7. int a=0;
  8. Scanner in = new Scanner(System.in);
  9. a = in.nextInt();
  10. if (a>5 && a<=11)
  11. {
  12. if (a>=6 && a<=8)
  13. {
  14. System.out.printf("Summer");
  15. }
  16. else System.out.printf("Autumn");
  17. }
  18. if((a>=1&&a<=5)||(a==12))
  19. {
  20. if (a>=3 && a<=5)
  21. {
  22. System.out.printf("Spring");
  23. }
  24. else System.out.printf("Winter");
  25. }
  26. }
  27. }
Success #stdin #stdout 0.06s 4386816KB
stdin
12
stdout
Winter