Site icon TestingDocs.com

How to print a 2D array on console using RAPTOR

Overview

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

 

 

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.

 

 

 

Print Two Dimensional Array

Sample Output

 

Raptor Tutorials on this website can be found at:

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

Exit mobile version