Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Write a program which asks the user to enter an integer. Your program should then display the sum of the even digits of

C++ Programmingimage text in transcribed

Write a program which asks the user to enter an integer. Your program should then display the sum of the even digits of the integer. A typical run would be: Enter an integer greater than 10000: 34 34 is not greater than 10000 Enter an integer greater than 10000: 39428 The sum of the even digits of 39248 is: 14 Hints 1. Use a loop to ensure that the number entered is >10000 2. You don't need to be concerned with the length of the integer, use a while loop which ends when the number is equal to zero 3. You will need to preserve the original value entered, so after the user enters it, copy it to another int variable 4. You can access the last digit of an integer by dividing modulo by 10, eg digit-workingNumber % 10; 5. You can remove the last digit of an integer by dividing by 10, eg workingNumber/- 10; Activity 09 Rubric Criteria Ratings Pts 2.0 pts Full Marks 0.0 pts No Marks User input with validation 2.0 pts 1.0 pts Full Marks 0.0 pts No Marks Appropriate loop design 1.0 pts 2.0 pts Full Marks 0.0 pts No Marks Correct answer for test input 2.0 pts Total Points: 5.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

Students also viewed these Databases questions

Question

Discuss the research behind the notion of a pancultural self

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago