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

find the cube root of 740
Which of the following is a sign of inflammation? a. bruising b. swelling c. numbness d. temperature decrease
write the equation a. a vertical line that passes through the point (2,-6)b. the y axis c.  a horizontal line that passes through the point (1,4)d. the x axis
how did congress try to settle  the slavery issue in 1850?
find the cube root of 740
what decimal is equivalent to 122/11?
Why did the English settle in the Chesapeake Bay area?
Using Subjects and Predicates in a paragraph.Your best friend is on vacation, and you are pet-sitting. Write a paragraph about your experience taking care of yo
turn 1/8 in to a decimal
a giraffe can run about 14 meters per second find its speed in miles per hour