In this tutorial, we will design a RAPTOR flowchart to compute the sum of squares of given array elements. The user enters the numbers.
Compute the sum of squares of the user-given numbers. Let a1, a2, …..an are the numbers.
Sum = a1^2 + a2^2 + a3^2 + ….. + an^2
The input to the flowchart from the user:
- Array size
- Array elements
We will use the array to store the numbers.
The flowchart uses a modular approach. The flowchart is divided into smaller problems and appropriate sub-modules/functions would be designed to accomplish the tasks. The main flowchart invokes the other sub-modules. The main function uses three procedures.
The Populate_Array() function creates and populates the array of a given size with the user input numbers.
Print Array Elements
The Print_Array() function prints the array elements on the output console.
The Compute_SumSquares() function computes the sum of the square of the array elements and prints the sum on the output console window.
Save the and run the flowchart. Enter the array size and the numbers. The numbers will be stored in the array.
That’s it. We have successfully designed a RAPTOR flowchart to compute the sum of squares of the given numbers using a modular approach.
Raptor Tutorials on this website can be found at:
RAPTOR official website: