Question: 2 Egyptlan Pyramed ( 2 5 pointal. Let's build a pyramid with the help of a 2 - dimansional ( 2 D ) aray. Long

2 Egyptlan Pyramed (25 pointal. Let's build a pyramid with the help of a 2-dimansional (2D) aray.
Long ago, some advancod divilzations such as the Egyplans modelad their architecture to be of pyramid form 3-Dimancionsl polyhodra with some trangles. You wil be tasked with understanding and implementing 2D array(s) to cresta a 2-Dimarcional pyramid of your own
Overview
The shudents neod to code a program that rasos two command line arguments from the tarminal meresenting:
1. the oweral elen of their flgure
2. the rumber of bricks providas-to build a pyramid.
Programming compiate:
- The surmuncing aroa is to be filed with the symbol"
Once the 2D array (Pyramid) ts conctructod print:
- the 2D array starting at mow and column anmo lo.dJ.
Note: Koop in mind that the output is expectad be PRINTED into the tarminal.
Programming
Example 1: Exowiting the command
produces a \(3\times 32\mathrm{D}\) grid with 1 ininal brick to construct the pyramid.
The output looks live this (Note the placoment of the brick is on the laft side of the last row):
migereser
\(\theta \) Bricks Renaining Bricks Renaining
Example 2: Exociling the command
produces \(24\times 42\mathrm{D}\) grid with 5 initial tribks to conctruct the pyramid.
The output looks live this:
Example a: Exomiting the command
produces a \(5\times 52\mathrm{D}\) grid with 1 s initital bricks to construct the pyrmid. The output looks like this:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!