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 _______________ is the spreading of lava that pours out of a volcano.Need help!!!!!
A sewing club used 48 feet of fabric to make 8 blankets. At this rate how many blankets can be made from 12 feet of fabric?
what is a strategy for 336 divided by 8
What is the slope of a line parallel to the graph of y+1=-8(x-2)?
What large body of water (a bay) borders Delaware on the north east
The deck in Hopes backyard is round.It has 5 post evenly spaced around the edge to support a trellis. For her birthday party , she wants to connect each post to
A historian's upbringing can influence their interpretation of historical events. True False
The heights of three flower pots are 45cm 30cm and 10cm. Write the ratio of their heights in ratio form
Renuka has two pounds of pepper in her cupboard. She knows that there are 16 ounces in one pound. After Renuka makes one batch of Garam Masala, how many ounces
a rectangular field has a perimeter of 500m and an area of 14400m2.  Find the lengths of the sides