Write a C++ program that asks the user to enter an even number only. If the user enters an odd number the program should use input validation to ask the user to enter another number.
- The user can enter as many numbers as he wants
- The program should also keep a count of how many numbers entered and display how many odd and even numbers entered.
If you're not sure how to begin a program, start writing out the steps in regular language, then think about how you'd translate those to C++ code.
something like...
while the user wants to enter a number
---ask user to enter an even number
---while the number is odd
------increment odd number counter
------ask user to enter an even number
---increment the even number counter
---ask the user if they want to enter another number
print number of even numbers entered, print number of odd numbers entered