Question: JAVA LANGUAGE: Write a program that has the user input a number. Then, use a while loop with the following conditions: - If the user
JAVA LANGUAGE: Write a program that has the user input a number. Then, use a while loop with the following conditions: - If the user inputs 1 through 7, print out the appropriate line from the poem: 1(Monday): Monday's child is fair of face 2(Tuesday): Tuesday's child is full of grace 3(Wednesday): Wednesday's child is full of woe 4(Thursday): Thursday's child has far to go 5(Friday): Friday's child is loving and giving 6(Saturday): Saturday's child works hard for its living 7(Sunday): But the child that is born on the Sabbath day is bonny and blithe, and good and happy -If the user enters a number greater than 7, then let the user know the number is invalid -If the user enters a 0, then stop the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
