TestingDocs.com
Testing Questions
  • JBehave
  • Selenium
  • Maven
  • TestLink
  • Git
  • RAPTOR
  • Contact

Flowchart to calculate total and average of array elements

Tweet
Pin it

Document Contents

  • Overview
  • Pseudocode
  • Flowchart

Overview

In this flowchart, we will compute the total and average of the array elements. Total is the sum of all the elements in the array. Average is total divided by the number of elements in the array.

To read values into an array, follow the link:

https://www.testingdocs.com/questions/how-to-read-values-into-an-array-using-raptor-flowchart/

 

 

total and average marks

Pseudocode

   Average(marks)
    
      DECLARE total
      DECLARE index

      total = 0
      index = 1
      DO UNTIL index > 5
         total = total + marks(index)
         index = index + 1
      LOOP
      OUTPUT "Total Marks =" + total
      OUTPUT "Average :=" + (total / Lenght_of(marks))
END

Flowchart

We will take the marks array in this example. marks array holds 5 subject marks of the student Alice.In this flowchart we will compute the total marks and the average.

Inside the loop, we will accumulate the sum of the array elements:

total <- total + marks[index]

 

total and Average Flowchart

 

After the loop we will output the total marks and calculate the average.

Average <- total/length_of(marks)

 

RAPTOR Tutorials on this website can be found at:

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

For more information on RAPTOR, visit the official website at: https://raptor.martincarlisle.com/

Related Posts

Bull

RAPTOR Flowcharts /

How to draw Bull’s Eye Raptor Graphics Flowchart

Weekly Gross Pay Raptor Flowchart

RAPTOR Flowcharts /

Weekly Gross Pay Raptor Flowchart

Reptition Structure

RAPTOR Flowcharts /

How to add repetition structure to the Raptor Flowchart

Selection Symbol

RAPTOR Flowcharts /

How to use selection symbol in Raptor flowchart

Calculator Raptor Flowchart

RAPTOR Flowcharts /

Calculator Raptor Flowchart

Tag Cloud

Eclipse Git Java Programs Mathematics

Random Questions

  • How to connect to pluggable database (PDB) using SQL*Plus?
    Overview In this tutorial, we will learn the steps

    Read more

  • How to manually Update new Edge Browser on Windows 10
    Introduction In this tutorial, we will go through the

    Read more

  • How to setup JDK 15 environment in IDEs
    Overview In this tutorial, we will see the steps how

    Read more

Back to Top

TestingDocs.com

  • Privacy Policy
  • Cookie Policy
  • JBehave
  • Selenium
  • Maven
  • TestLink
  • Git
  • RAPTOR
  • Contact
www.TestingDocs.com | All Rights Reserved