Question: The following program first reads an integer number 'number' entered by the user and assumed to be greater than 5. The program uses two variables

The following program first reads an integer number 'number' entered by the user and assumed to be greater than 5. The program uses two variables 'oddCount' and 'evenCount' for counting respectively the odd and even numbers between 1 and the entered number inclusively. Finally, the program prints both counts ('oddCount' and 'even Count')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
