Computer Science, asked by jsprashantchouhan, 8 months ago

Write a program to enter the day number that is from 1 to 7 and the corresponding weekday should
get printed. 1 stands for SUNDAY and 7 stands FOR SATURDAY. ​

Answers

Answered by ayasmitamanna146
1

Answer:

java program

Explanation:

public class daynumber

{

public static void main(Sting[]args)

{

Switch(day)

{

Switch day1:

System.out.println("Sunday");

break;

}

{

Switch day2:

System.out.println("Monday");

break;

}

{

Switch day3:

System.out.println("Tuesday");

break;

}

{

Switch day4:

System.out.println("Wednesday");

break;

}

{

Switch day5:

System.out.println("Thursday");

break;

}

{

Switch day6:

System.out.println("Friday");

break;

}

{

default:

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

}

}

}

}

Similar questions