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

    • Running Tests in Parallel with Selenium Grid
    • Advanced Selenium Features
    • Locating Web Elements
    • Running the Test Script
    • Writing Your First Selenium Test Script
    • Getting Started with Selenium Automation Testing
    • Setting Up the Environment
    • How can you monitor the Quality Assurance Audit?
    • Leveraging LambdaTest with Appium 2.0
    • Appium 2.0 Plugins ListAppium 2.0 Plugins
    • Touch Actions and Multi-Touch Actions
    • Changes in Drivers and Classes
    • Appium Inspector
    • Capabilities in Appium 2.0
    • Appium 2.0 Driver ListAppium 2.0 Driver Installation & Management
    CyberLink Multimedia Software

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com