subject

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: Use a loop to ensure that the number entered is > 10000. 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. You will need to preserve the original value entered, so after the user enters it, copy it to another int variable. You can access the last digit of an integer by dividing modulo by 10, eg digit = workingNumber % 10; You can remove the last digit of an integer by dividing by 10, eg workingNumber /= 10;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
You know the right answer?
Write a program which asks the user to enter an integer. Your program should then display the sum of...
Questions
question
Mathematics, 17.01.2022 01:00
question
Mathematics, 17.01.2022 01:00
question
Physics, 17.01.2022 01:00
question
Mathematics, 17.01.2022 01:00
question
Computers and Technology, 17.01.2022 01:00
question
Mathematics, 17.01.2022 01:00
Questions on the website: 13722367