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

125 thousandths = 1 tenth _______________ thousandths
What two mixed numbers have a sum of 3
A water molecule gains enough energy to enter the gas phase is chemical or physical?why?
how do you do scientific notation? what is 1.20 x 10 to the 3rd power
What is the gel like substance in a plant and animal cell?
Round $6.6666 to the nearest cent
How would you find the zeros of the function by rewriting the function in intercept form? Ex: y=x^2-12x+32
Can there be more than one point of intersection between the graphs of two linear equations?
What was Ramses the second leadership style
in 5.074 the digit 5 stands for _____________