subject

Write a program that will take an integer and add up each of the number’s digits, count the number of digits in the number, and then average the digits. you must use a while loop and % to access each of the individual digits. use / to reduce the number so that you can average all of the digits. example: num = 123 can be taken apart with tempnum = 123 % 10 (which will pull off the 3), then tempnum = tempnum / 10 (will result in 12). do this in a loop while the number is > 0.   sample data : 234 10000 111 9005 84645 8547 123456789      be sure to include print statements that will format the output as below. sample output : 234 has a digit average of 3.0   10000 has a digit average of 0.2   111 has a digit average of 1.0   9005 has a digit average of 3.5   84645 has a digit average of 5.4   8547 has a digit average of 6.0   123456789 has a digit average of 5.0

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
Which number on the image above correctly indicates the name of a folder in this url? a.1b.2c.3d.4
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 25.06.2019 04:50
Your program should prompt the user for the dimensions of the two squares matrices, making sure that the user input is greater than or equal to 4.[ yes, an example would be a4x4matrix]2.if the above is not met, prompt the user for a new value.3.now generate random integernumbers to fill both matrices.4.display these two matrices on the screen.5.multiply the two matrices and display the result on the scre
Answers: 2
question
Computers and Technology, 25.06.2019 12:00
Which describes which ctso each student should join
Answers: 1
You know the right answer?
Write a program that will take an integer and add up each of the number’s digits, count the number o...
Questions
question
Mathematics, 22.09.2020 03:01
question
Mathematics, 22.09.2020 03:01
question
Mathematics, 22.09.2020 03:01
question
Mathematics, 22.09.2020 03:01
question
English, 22.09.2020 03:01
question
Spanish, 22.09.2020 03:01
question
Biology, 22.09.2020 03:01
Questions on the website: 13722359