//Get month with do loop until valid, switch/case to print season //Season package months; import java.util.*; public class Seasons { public static void main(String[] args) { Scanner keyboard=new Scanner(System.in); //do just once int month; String season=""; do { System.out.print("Enter the number of the month:"); month=keyboard.nextInt(); } while(month<1 || month>12); switch (month) { case 3: case 4: case 5: season="Spring"; break; case 6: case 7: case 8: season="Summer"; break; case 9: case 10: case 11: season="Fall"; break; case 12: case 1: case 2: season="Winter"; break; //no default needed because do loop forces a valid month } //switch month System.out.println(season); }//main }//class