Question: Write a program, FloorIsLava.java, that reads 1 integer argument from the command line. Expect the input to be an integer value greater than or equals

Write a program, FloorIsLava.java, that reads 1 integer argument from the command line.
Expect the input to be an integer value greater than or equals 0.
If the input is 0, nothing is expected to be printed.
The program is expected to print all even numbers up to and including the input value (if even). Once all the even numbers have been printed, it prints all odd numbers in descending order (starting with the input value).

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!