Question: Write a program that calls three methods. The three methods are: printNumbers, printOdds, and printEvens. The first method prints all numbers between 1 and 30

Write a program that calls three methods. The three methods are: printNumbers, printOdds, and printEvens. The first method prints all numbers between 1 and 30 (inclusive). The second method prints all the odd numbers between 1 and 30 (inclusive). The third method prints all the even numbers between 1 and 30 (inclusive). Note: All of the numbers for each loop should be printed out on the same line with a nice header such as. The even numbers are 2, 4, 6, 8, .. etc. The main method should call the other three methods.

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