Question: Using c++ (Urgent) thanks! Q2. [4 points] Write a program that asks the user to enter non-negative integer numbers in a loop (1 to stop).
Q2. [4 points] Write a program that asks the user to enter non-negative integer numbers in a loop (1 to stop). The program should check, using the conditional operator (?i), if the number is even or odd. The program should count the even numbers and the odd numbers separately. The program should print a message at the end displaying how many even and odd numbers were entered. Hint: Even numbers are divisible by 2 with 0 remainder. Samnle Session: (Values in Green are entered by the user)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
