prasiddhachaulagain9 prasiddhachaulagain9
  • 21-08-2021
  • Computers and Technology
contestada

Write a algorithm to calculate the sum of digits in a given three digit number

​

Respuesta :

XxItzPaglisBandixX
XxItzPaglisBandixX XxItzPaglisBandixX
  • 21-08-2021

[tex]{\huge{\pink{↬}}} \:  \: {\huge{\underline{\boxed{\bf{\pink{Answer}}}}}}[/tex]

Sum of digits algorithm

Step 1: Get number by user.

Step 2: Get the modulus/remainder of the number.

Step 3: sum the remainder of the number.

Step 4: Divide the number by 10.

Step 5: Repeat the step 2 while number is greater than 0.

Answer Link

Otras preguntas

a 91 square bathroom has the length of 13 ft what will be the width of the bathroom?
A certificate or token that represents a fixed quantity of a commodity is called A. representative money. B. credit. C. commodity money. D. fiat money.
Can anybody please write 2 sentences on overproduction??? thank u
A figure that has no endpoints is called a
What is the different earth and venus
A parking space shaped like a parallelogram has a base of 17 feet and a height is 9 feet. A car parked in the space is 16 feet long and 6 feet wide. How much of
Which is an example of a heterogeneous catalyst? amylase catalytic converter food preservatives amino acids
What was the Gulf of Tonkin Resolution? A. An authorization to use force in Korea B. The declaration that the spread of communism wouldn't be tolerated in Asia
Government failure can happen when politicians don't objectively weigh all the ___________ of various programs. Because politicians want voter support, they oft
What was New York role in the American revolution