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 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

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!