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

Which Countries Don't Have A Democracy?
Why is the nickname dark reaction not entirely correct for the chemical stage of photosynthesis?
what are the Muslim religious duties called
What were men or woman admired for brave deeds called in ancient times?
Milo has received several credit card offers. Which of the following features is the riskiest? High credit limit Fixed interest Low credit limit Variable intere
Mark drank 410 ml of mountain dew from a 2-liter bottle. How much mountain dew remain in the bottle?
Why was trade important to the Maya civilization?
What prompted Portugal to eventually grant Angola its freedom?
How did the Civil War speed up America’s industrialization?
Which of these was a consequence of the Civil War? General William Tecumseh Sherman's March to the Sea destroyed Southern transportation lines. President Lincol