Question: Write a C++ program that computes the number of decimal digits of a given integer n. The number could be either positive or negative or

 Write a C++ program that computes the number of decimal digits

Write a C++ program that computes the number of decimal digits of a given integer n. The number could be either positive or negative or zero. The program should also prints the number of even and odd digits in the number. See below for sample runs of the program. Run 1 input 123456 Run 1 output The number entered is 123456 The number of digits in 123456 is 6 The number has 3 even digits and 3 odd digits Run 2 input -950132 Run 2 output The number entered is -950132 The number of digits in -950132 is 6 The number has 2 even digits and 4 odd digits

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!