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, 22.06.2019 08:50
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
@josethesolis i need can anyone text me and follow me
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
English, 19.02.2021 02:50
question
Mathematics, 19.02.2021 02:50
Questions on the website: 13722363