Default

How to print a 2D array using RAPTOR

How to print a 2D array using RAPTOR

A 2D Array (two-dimensional array ) is used to store and retrieve information with two dimensions, like a matrix. It has rows and columns.

Single-dimensional array example:

A single-dimensional array has one index to identify Alice’s subject.

Array using Raptor Flowchart/

Now, let’s say we are building a flowchart for Alice’s class, which has many students. We want to capture all students’ marks. If Alice’s class has n students, we need n single-dimensional arrays for each student.

 

To identify an element in a two-dimensional array, we need two parameters: one to identify the row and one to identify the column. In RAPTOR, they are separated with commas.

For example:

StudentMarks[2,3]

2 identifies the student row

and 3 identifies the subject.

Read  Two Dimensional Array

 

Two dimensional Array flowchart main

 

To handle a two-dimensional array in the flowchart, we need two loops: one loop to track the row and another to track the column.

 

Two Dimensional Input1

 

Two Dimensional Array Input 2

 

Print Two Dimensional Array

Two Dimensional Array Output1

TwoDimensional Output 2

Sample Output

Array Flowchart Output

 

Raptor Tutorials on this website can be found at:

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