TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Raptor Flowchart

Sum of Squares of Given Array Elements

Overview

In this tutorial, we will design a RAPTOR flowchart to compute the sum of squares of given array elements. The user enters the numbers.

Problem Statement

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

Input

The input to the flowchart from the user:

  • Array size
  • Array elements

We will use the array to store the numbers.

RAPTOR Flowchart

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.

  • Populate_Array()
  • Print_Array()
  • Compute_SumSquares()

 

Sum of Squares Array Elements Modular Approach

The Populate_Array() function creates and populates the array of a given size with the user input numbers.

 

Populate Given Array Eelements Procedure RAPTOR

Print Array Elements

The Print_Array() function prints the array elements on the output console.

 

Print Array Eelements Raptor Procedure

The Compute_SumSquares() function computes the sum of the square of the array elements and prints the sum on the output console window.

Compute Sum Of Squares Array Elements Raptor

Sample Output

Save the and run the flowchart. Enter the array size and the numbers. The numbers will be stored in the array.

Sum of squares Array Elements Raptor Output

 

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

Raptor Tutorials on this website can be found at:

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

RAPTOR official website:

https://raptor.martincarlisle.com/

Related Posts

Install RAPTOR Avalonia CentOS

Raptor Flowchart /

Install RAPTOR Avalonia on CentOS

RAPTOR Avalonia Edition Windows

Raptor Flowchart /

Download RAPTOR Avalonia Edition on Windows

RAPTOR Editions

Raptor Flowchart /

RAPTOR Editions

RAPTOR flowcart to write to a file output

Raptor Flowchart /

Write to a file with RAPTOR flowchart

Raptor Flowchart /

Simulation of probabilities die roll using Raptor Flowchart

‹ Simulation of probabilities die roll using Raptor Flowchart› Write to a file with RAPTOR flowchart

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com