Question: Write a program named Weekday that reads an integer. If the integer is less than 1 or greater than 7 it prints invalid; otherwise it

Write a program named Weekday that reads an integer. If the integer is less than 1 or greater than 7 it prints "invalid"; otherwise it displays SUNDAY if the integer was 1, MONDAY if it was 2,... and so on... SATURDAY if it was 7. Please don't use if else statements or loops or methods or arrays just simple JAVA
Write a program named Weekday that reads an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!