{"id":6046,"date":"2017-01-07T16:17:46","date_gmt":"2017-01-07T16:17:46","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=6046"},"modified":"2024-09-04T07:31:30","modified_gmt":"2024-09-04T07:31:30","slug":"how-to-print-a-2d-array-on-console-using-raptor","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/how-to-print-a-2d-array-on-console-using-raptor\/","title":{"rendered":"How to print a 2D array on console using RAPTOR"},"content":{"rendered":"<h2>How to print a 2D array on console using RAPTOR<\/h2>\n<p>A 2D Array (two-dimensional array ) is used to store and retrieve information with two dimensions, like a matrix. It has rows and columns.<\/p>\n<p>Single-dimensional array example:<\/p>\n<p>A single-dimensional array has one index to identify Alice&#8217;s subject.<\/p>\n<p><strong><a href=\"https:\/\/www.testingdocs.com\/questions\/how-to-read-values-into-an-array-using-raptor-flowchart\/\">Array using Raptor Flowchart\/<\/a><\/strong><\/p>\n<p>Now, let&#8217;s say we are building a flowchart for Alice&#8217;s class, which has many students. We want to capture all students&#8217; marks. If Alice&#8217;s class has n students, we need n single-dimensional arrays for each student.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>For example:<\/p>\n<p>StudentMarks[2,3]<\/p>\n<p>2 identifies the student row<\/p>\n<p>and 3 identifies the subject.<\/p>\n<h3>Read\u00a0 Two Dimensional Array<\/h3>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6080\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-dimensional-Array-flowchart-main.png\" alt=\"Two dimensional Array flowchart main\" width=\"1350\" height=\"690\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-dimensional-Array-flowchart-main.png 1350w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-dimensional-Array-flowchart-main-300x153.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-dimensional-Array-flowchart-main-1024x523.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-dimensional-Array-flowchart-main-768x393.png 768w\" sizes=\"auto, (max-width: 1350px) 100vw, 1350px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6093\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Input1.png\" alt=\"Two Dimensional Input1\" width=\"1224\" height=\"922\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Input1.png 1224w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Input1-300x226.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Input1-1024x771.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Input1-768x579.png 768w\" sizes=\"auto, (max-width: 1224px) 100vw, 1224px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6082\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Input-2.png\" alt=\"Two Dimensional Array Input 2\" width=\"1014\" height=\"703\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Input-2.png 1014w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Input-2-300x208.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Input-2-768x532.png 768w\" sizes=\"auto, (max-width: 1014px) 100vw, 1014px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Print Two Dimensional Array<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6087\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Output1.png\" alt=\"Two Dimensional Array Output1\" width=\"1124\" height=\"914\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Output1.png 1124w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Output1-300x244.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Output1-1024x833.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Two-Dimensional-Array-Output1-768x625.png 768w\" sizes=\"auto, (max-width: 1124px) 100vw, 1124px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6088\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/TwoDimensional-Output-2.png\" alt=\"TwoDimensional Output 2\" width=\"1223\" height=\"672\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/TwoDimensional-Output-2.png 1223w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/TwoDimensional-Output-2-300x165.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/TwoDimensional-Output-2-1024x563.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/TwoDimensional-Output-2-768x422.png 768w\" sizes=\"auto, (max-width: 1223px) 100vw, 1223px\" \/><\/p>\n<h3>Sample Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6092\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output.png\" alt=\"Array Flowchart Output\" width=\"1595\" height=\"984\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output.png 1595w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output-300x185.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output-1024x632.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output-768x474.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Array-Flowchart-Output-1536x948.png 1536w\" sizes=\"auto, (max-width: 1595px) 100vw, 1595px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Raptor Tutorials on this website can be found at:<\/p>\n<p><a href=\"https:\/\/www.testingdocs.com\/raptor-a-flowchart-tool\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>https:\/\/www.testingdocs.com\/raptor-a-flowchart-tool\/<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to print a 2D array on console 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&#8217;s subject. Array using Raptor Flowchart\/ Now, let&#8217;s say we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[187],"tags":[208],"class_list":["post-6046","post","type-post","status-publish","format-standard","hentry","category-flowchart","tag-mathematics","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/6046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=6046"}],"version-history":[{"count":21,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/6046\/revisions"}],"predecessor-version":[{"id":24096,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/6046\/revisions\/24096"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=6046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=6046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=6046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}