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

the sun of 3 times a number and 5 is 2 times the number plus 15. what is half the number
Assess the poem below with respect to each characteristic of lyric poetry. Describe each characteristic as either matching the lyric poetry model or not. POEM:
Click to read "I Am Offering this Poem" by Jimmy Santiago Baca. Then answer the question. Which phrase from the poem best contributes to the comforting tone of
SHOW STEPS PLEASE!!!
Why is it important to write only about the key events when writing a narrative?
Kelsey’s history instructor is not very engaging — no matter how hard she tries to pay attention to his lectures, she is unable to focus. He does not write anyt
What’s the answer for x thanks
Levi boards a Ferris wheel with a diameter of 100 feet. What is the approximate distance, to the nearest foot, that Levi travels in six revolutions of the wheel
the lengths of the sides of a triangle are in the ratio of 5:3:4. The perimeter of the triangle is 156cm. Find the length of the longest side.
Who were the moors and where did they live ?