The raptor Flow chart enables you to create executable flowcharts. Mathematical notation for the sum of squares is shown:
Mathematical notation for the sum of squares up to n numbers is:
or in simple notation
|Test Case Scenario||Detailed Steps||Test Data||Expected Result||Actual Result|
|Find the sum of squares of N integers.||
||10||385||To be filled after executing the flowchart. The actual result should match the expected result.|
Steps to build
Raptor flow chart steps for the program is shown below:
Start the Raptor flowchart tool.
You would be provided with a flowchart with Start and End symbols.
Save the flowchart with a name.
Add Assignment symbols for Assignment( left-clicking once on the symbol and then adding it between Start and End.)
i <- 1
sum <- 0
series <- ” ”
Add Input symbol to the flowchart. Double click to add the prompt “Enter number” and use the variable name N.
Add a loop structure to the flow chart.
Edit its expression to
i > N
In the loop structure for NO decision, do the following things:
Add Assignment symbols to the flowchart to the flowchart for sum, series and i
sum <- sum + ( i* i )
series <- series + ” ” + ( i*i )
i <- i + 1
Add an Output symbol to the flowchart to output series
series <- series + ” ” + ( i*i ) statement is just to print the series to the output console window.
Raptor Flow chart Sum of squares
In the loop structure for YES decision,
Add an Output symbol to the flowchart to output the sum
Once you are done with a flow chart, You can execute the Raptor flow chart by clicking on Execute to completion button. You can verify the inputs and outputs in the run. ( Explore Run menu options for more details). While designing the flow chart you can even test and debug using the “Step to Next shape” button.
Sample Output of the Flowchart
Series= 1 4
Series= 1 4 9
Series= 1 4 9 16
Series= 1 4 9 16 25
Series= 1 4 9 16 25 36
Series= 1 4 9 16 25 36 49
Series= 1 4 9 16 25 36 49 64
Series= 1 4 9 16 25 36 49 64 81
Series= 1 4 9 16 25 36 49 64 81 100
Sum of squares:385
More Flowchart Examples
Raptor Tutorials on this website can be found at:
RAPTOR official website: https://raptor.martincarlisle.com/