Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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++
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started