Computer Science, asked by kdevasree98, 9 months ago

Write a Java program using Switch-case construct to accept month number and display the
respective season
For month January, November and December the season is Winter, month of February and
March is Spring, April May and June is Summer, July, August and September is Rainy season
and rest of the months are Autumn

please answer it ASAP
will mark as brainliest​

Answers

Answered by SwapnilMehta
1

Answer:

import java.util.*;

class season

{

public static void main (String args [])

{

Scanner sc=new Scanner (System.in);

System.out.println("Enter The Month Number eg: 1 for January...");

int ch=sc.nextInt();

switch(ch)

{

case 1:

case 12:

case 11:

System.out.println("Winter");

break;

case 2:

case 3:

System.out.println("Spring");

break;

case 4:

case 5:

case 6 :

System.out.println("Summer");

case 7:

case 8:

case 9 :

System.out.println("Rainy");

break;

case 10:

System.out.println("Autumn");

break;

default:

System.out.println("Wrong Output");

}

}

}

Please Subscribe my Youtube Channel Study To Study ICSE-Swapnil Mehta for more Java Programs :)

Explanation:

Hope this help you

Thank you

Please mark me as brainlist :)

Similar questions