Question: Please write the below by c++ This program reads 10 integers and then prints the number of odd and even integers. It also outputs the

Please write the below by c++

This program reads 10 integers and then prints the number of odd and even integers. It also outputs the number of zeros.

The program first prompts the user to specify how many integers are to be read, then the program read the numbers input by the users.

Input

Output -> The integers inputted, the number of zeros, even numbers, and odd numbers.

After reading a number, you need to check whether it is even or odd. Suppose the value is stored in number. Divide number by 2 and check the remainder. If the remainder is 0, number is even. Increment the even count and then check whether number is 0. If it is, increment the zero count. If the remainder is not 0, increment the odd count.

Please create these four functions in your program:

Function initialize Initialize the variable to store input numbers, number of zeros, even numbers, and odd numbers to 0.

Function getNumber Receive the input from the user

Function classifyNumber Classify the input number to zeros, even numbers, and odd numbers

Function printResults Print the integers inputted, the number of zeros, even numbers, and odd numbers.

Sample output:

Please write the below by c++ This program reads 10 integers and

Please enter 10 integers: 5834207391 The numbers you entered are: 5834207391 The number of odd numbers is 6 The number of even numbers is 4 The number of zeros is 1 Please enter 10 integers: 54671209208230 The numbers you entered are: 54671209208230 The number of odd numbers is 3 The number of even numbers is 7 The number of zeros is 3

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!