Question: Please write this Java program as simple as possible and with comments throughout to explain what is happening. Thank you! Program 2 (120 points): Re-design

 Please write this Java program as simple as possible and with
Please write this Java program as simple as possible and with comments throughout to explain what is happening. Thank you!

Program 2 (120 points): Re-design and re-implement program Lab5 Exercise3 (name it EvenOdd) such that only one while loop is used to determine all even and all odd numbers between 50 and 100 (inclusive). All numbers within the range must be handled within the while loop and only a number's position in the output (first or last on the line) gets special handling in the loop (in other words, do not assume that 50 and 51 are the first even and odd numbers in the lines or that 99 and 100 are the last odd and even numbers in the lines and treat them as special cases). As in Lab6Exercise3, print all even numbers on a single line and all odd numbers on a new line, inserting a comma and a space between numbers. Use proper labels for the outputs as shown in the example below and do not print a comma and space after the last number (or before the first number) on each line. Line up the outputs after the labels as shown below: Even numbers between 50 and 100: 50, 52, 54, 56, 58, 60, 62, 64, .. Odd numbers between 50 and 100: 51, 53, 55, 57, 59, 61, 63, 65

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a Java program that determines all even and odd numbers between 50 and 100 using a single ... View full answer

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 Databases Questions!