Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions