Question: c++ 1. Write a program called a05part2.cpp that reads an integer from the user and uses while loops to output the number of odd digits

c++
c++ 1. Write a program called a05part2.cpp that reads an integer from

1. Write a program called a05part2.cpp that reads an integer from the user and uses while loops to output the number of odd digits and even digits in that integer. For example, if the user enters 2536, your program should output 2 even digits and 2 odd digits. If the user enters 1298763, your program should output 3 even digits and 4 odd digits. Hint: Use the % and / by 10 to break the integer into individual digits. Then use % to check if the number is even or odd

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!