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

What is a major city in Alaska that starts with F
Water on each side of a divide flows in...
How do you think the world was created?
Which statement illustrates the distributive property? Please help
What is the difference between preterite and imperfect and the past progressive and present progressive?
What is a major city in Alaska that starts with F
Pyrenees mountains border Spain and this European country starts with F
What is 36 percent as a decimal?
Water on each side of a divide flows in...
Rio grande river separates what Texas city from Mexico starts with E