Site icon TestingDocs.com

Sum of Digits of a Number Raptor Flowchart

Overview

In this article, we will create a RAPTOR flowchart to calculate the Sum of digits of a number. The flowchart would prompt the user to enter a positive number. The flowchart should compute and output the sum of digits.

For example:

number = 9875

Flowchart output = 9 + 8 + 7 + 5

= 29

 

Flowchart

We will divide the number by 10 to get the last digit.

To get the quotient

quotient = floor(number/10);

Accumulate the digits in an accumulator to get the sum of digits.

Sample output

Sum of digits of the number 9875 is =: 29

More Flowchart Examples

https://www.testingdocs.com/raptor-flowchart-examples/

Raptor Tutorial

Raptor Tutorials on this website can be found at:

https://www.testingdocs.com/raptor-a-flowchart-tool/

RAPTOR official website: https://raptor.martincarlisle.com/

Exit mobile version