Answered step by step
Verified Expert Solution
Link Copied!

Question

00
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++
image text in transcribed
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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions