Computer Science, asked by abdulsamad36943, 1 year ago

write a program using switch case to display month of user choice​

Answers

Answered by ArchitPathak
6

import java.util.Scanner;

class switch{

public static void main(String[] args)

{

int season =0;

Scanner sc =new Scanner (System.in);

System.out.println();

System.out.println("Enter the season number");

season = sc.nextInt();

switch(season)

{

case 1:

System.out.println("Jan");

break;

case 2:

System.out.println("Feb");

break;

case 3:

System.out.println("mar");

break;

case 4:

System.out.println("Apr");

break;

case 5:

System.out.println("May");

break;

case 6:

System.out.println("June");

break;

case 7:

System.out.println("July");

break;

case 8:

System.out.println("Aug");

break;

case 9:

System.out.println("Sep");

break;

case 10:

System.out.println("Oct");

break;

case 11:

System.out.println("Nov");

break;

case 12:

System.out.println("Dec");

break;

default:

System.out.println("Not Session Data Found!!!");

break;

}

}

}

Similar questions