Question: Part 3: Use Eclipse to write a Java program that does the following. 1. Prompts the user to enter a positive integer N, reads the

Part 3: Use Eclipse to write a Java program that does the following. 1. Prompts the user to enter a positive integer N, reads the integer (N) entered by the user. 2. Uses a loop to print N lines. On each line, prints its number (1 to N) and a word ("Blue" or "Berry" or "Blueberry", depending on whether the number is divisible by 2, 3, or 6). Note that a number divisible by 6 will also be divisible by 2 and 3. In this case, only "Blueberry" should be printed. 3. Your program should also compute how many times each of the three words ("Blue," "Berry," and "Blueberry") was printed and output the total numbers for each of the words at the end. Sample dialog with the user may look like the following (user input is in green): Please enter positive integer N: 6 1 2 Blue 3 Berry 4 Blue 5 6 Blueberry Blue is printed 2 time(s). Berry is printed 1 time(s). Blueberry is printed 1 time(s)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
