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

Using the periodic table determine the number of neutrons in O that has an atomic mass of 16
You eat 3/10 of a coconut. Your friend eats 1/5 of the coconut. What fraction of the coconut do you and your friend eat. Write your answer as a fraction in simp
God's faithfulness is not limited by man's experience. True False
(98 points) Help Me And You Will Earn Brainiest.
if 2 minus 3x = -x minus 8 what is x ?
Benefits for people with a mental illness
To stabilize the emulsion of beurre blanc, you should add a small amount of A. cool water. B. reduced white wine. C. lemon juice. D. reduced h
Do you agree with jefferson that it is dangerous for judges to determine the constitutionality of congress’s laws?
Please help with #10, I know this is probably easy, but it's not for me!! Please explain how you got your answer too!! Thx!
Help please my Journalism Class!!!!! I think its B but not sure... From Businesses Intensify Pitch for 'Savviest Generation Ever' by Dave Carpenter © 2012 The A