Site icon TestingDocs.com

Raptor Flow chart for Multiplication Table

Overview

In this post, we will model a Raptor Flow chart for Multiplication Table. The flowchart would prompt the user to enter the number for which the multiplication table would be displayed.

Let’s assume the table will have 10 rows. The flow chart will generate 10 rows for the table.

Flowchart

Sample Output

Sample output for input N= 10.

The flowchart assumes valid input from the user.

Multiplication Table for 10
———————————————
1 * 10 = 10
2 * 10 = 20
3 * 10 = 30
4 * 10 = 40
5 * 10 = 50
6 * 10 = 60
7 * 10 = 70
8 * 10 = 80
9 * 10 = 90
10 * 10 = 100
———————————————

 

Each iteration in the loop(repetition structure) displays one row  of the table. The loop terminates when the row is more than the number of rows in the table. i.e 10.

Enhancements

Constant for Table Row

We can further enhance the flowchart to include constant for the table row count. Alternatively, we can declare a constant something like TABLE_ROWS and assign the value to the constant. We can now have the loop condition to check:

row > TABLE_ROWS

User Input validation.

As you can see there is not validation for the user input for the variable N. We just assumed that user will input a number. We can further enhance the flowchart to be defensive.

 

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