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 gerund is a type of verbal. it is a noun that adds "ing" to the end of a verb gerunds act as nouns. example: runing example: runing is fun
1000000000000 = 4*10?
Which of the following claims is the best thesis statement for an analysis essay on Romeo and Juliet? A. Shakespeare uses a lot of foreshadowing in Romeo and J
Can some please write an oral for me?Topic: camp experience Instructions:Time limit for speech, 3 minutes Oral must be presented with maturityNo visual aids are
PLSSS HELPPPPPPPPPPPO
HELP PLS. the length of a wall in a class is measured by a class 6 student and his teacher using their hand span the readings obtained by the student is 52 hand
Edward Steichen was very famous in the history of photography. Why was he famous
What were the Framers afraid of? plez help.
8b-4x+5 use b=-2 and x=-9 Simplified is?
For the following, round off each number to three significant digits, and then express it in scientific notation. 1) 3.478 2) 65.345 3) 4444 4) 3.1416 5) 55555