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 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 24.06.2019 19:00
Which of the following "invisible" marks represents an inserted tab?
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, 20.03.2021 14:50
question
Mathematics, 20.03.2021 14:50