Photo AI

Button [Display layout] The program must display the layout of the mall - NSC Information Technology - Question 3 - 2017 - Paper 1

Question icon

Question 3

Button-[Display-layout]---The-program-must-display-the-layout-of-the-mall-NSC Information Technology-Question 3-2017-Paper 1.png

Button [Display layout] The program must display the layout of the mall. Write code to use the data supplied in the two-dimensional array to display the layout in ... show full transcript

Worked Solution & Example Answer:Button [Display layout] The program must display the layout of the mall - NSC Information Technology - Question 3 - 2017 - Paper 1

Step 1

Button [Display layout]

96%

114 rated

Answer

To display the layout, start by defining the two-dimensional array arrMall which contains the characters representing the restaurants and open areas. Then, write code to loop through the rows of the array using an outer loop. For each row, utilize an inner loop to access the individual characters in each column and print them in a formatted manner. Ensure that the symbols from the array are displayed in neat columns for readability. This involves proper spacing and alignment when outputting the restaurant layout.

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;