# How to create a Flow Chart for sum of squares for N integers?

### Introduction

The raptor Flow chart enables you to create executable flowcharts. Mathematical notation for the sum of squares is shown:

### Mathematical Notation

Mathematical notation for the sum of squares up to n numbers is:

or in simple notation

Raptor flow chart steps for the program is shown below:

**Steps to build**

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.

### Loop Structure

Add a loop structure to the flow chart.

**https://www.testingdocs.com/questions/how-to-add-repetition-structure-to-the-raptor-flowchart/**

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

### Flowchart

### Raptor Flow chart Sum of squares

In the loop structure for YES decision,

Add an Output symbol to the flowchart to output 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.

### Screenshot

**Output of the Flowchart Execution**

Series= 1

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

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

### Raptor Tutorials

Raptor Tutorials on this website can be found at:

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