TestingDocs.com
Testing Questions
  • Home
  • Automation
    • Selenium
    • TestNG
  • Tutorials
    • MySQL Tutorials
    • TestLink
    • Maven
    • Git
  • Flowcharts
    • Flowgorithm
    • Raptor

RAPTOR Flowcharts

How to read values into an array using RAPTOR

Mathematics

Introduction

In this post, we will learn how to read values into an array using RAPTOR flowchart. We will prompt the user to enter marks for a student in 5 subjects. For this example, we will take a single dimensional array variable called marks. marks is an array variable that represents marks of a student called Alice in 5 different subjects like English, Mathematics, Physics, Chemistry, Biology.

 

Read values into an array

 

Flowchart

The flowchart would prompt the user to enter 5 subject marks. the numbers are stored in an array variable marks. The numbers would be stored using the index variable. The index is assigned to 1 and controlled with a loop. The loop would quit once the index is greater than 5.

marks[1]

marks[2]

marks[3]

marks[4]

marks[5]

 

Read values into an array RAPTOR

 

Loop condition

The loop is controlled using the loop condition. The loop condition is evaluated and the loop is executed if the condition is No. The index is incremented inside a loop.

index <- index + 1

The user entered values are stored using the array variable and the index inside square brackets.

marks[index]

Pseudocode

ReadArray() 
 DECLARE index
 DECLARE marks()

 index = 1
 DO UNTIL index > 5
 PROMPT "Enter marks for Alice"
 INPUT marks(index)
 index = index + 1
 LOOP
END

Print the array

To print the values in the array we need to use a loop. Instead of reading the values we use the output statement to print the values of the array.

 

output an array elements

 

 

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

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

‹ How to find square of given number using RAPTOR flowchart› How to find the largest value in an array Flowchart

Recent Posts

  • How to Hide Taskbar on Windows 11
  • How to edit PATH variable on Windows 11?
  • Enable BitLocker Drive Encryption on Windows 11
  • How to lock Windows 11 PC
  • How to Add, Remove Widgets on Windows 11
  • How to Rename PC on Windows 11?
  • How to Shut down Windows 11 PC?
  • How to launch command prompt on Windows 11
  • Install Windows 11 Insider Preview on Virtual Machine
  • How to Create a Restore point in Windows 11

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version