Question: Suppose that you are trying to write a program that produces the following output: 1 3 5 7 9 11 13 15 17 19 21
Suppose that you are trying to write a program that produces the following output:
1 3 5 7 9 11 13 15 17 19 21
1 3 5 7 9 11
The following program is an attempt at a solution, but it contains four major errors. Identify them all.

1. public class BadNews { public static final int MAX_ODD = 21; public static void writeOdds () { 4. // print each odd number for (int count = 1; count
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
Mistakes in BadNews program 1 The loop prints every third number not every odd n... View full answer
Get step-by-step solutions from verified subject matter experts
