Question: Programming The students are expected to use a 2 D array to construct the pyramid. The pyramid is constructed using the characters X ( bricks
Programming
The students are expected to use a D array to construct the pyramid. The pyramid is constructed using the characters Xbricks and no brick
Bricks, denoted by the symbol X are to be placed beginning at the bottom left and continue until either there are no more bricks or the pyramid is complete.
The surrounding area is to be filled with the symbol
Once the D array pyramid is constructed print:
the D array starting at row and column zero
the number of bricks remaining, in the format listed below.
Note: Keep in mind that the output is expected be PRINTED into the terminal.
Programming
Example : Executing the command
javac EgyptianPyramid.java
java EgyptianPyramid
produces a D grid with initial brick to construct the pyramid.
The output looks like this Note the placement of the brick is on the left side of the last row:
Example : Executing the command
javac EgyptianPyramid.java
java EgyptianPyramid
produces a D grid with initial bricks to construct the pyramid.
The output looks like this:
Example : Executing the command
javac EgyptianPyramid.java
java EgyptianPyramid
produces a D grid with initial bricks to construct the pyramid. The output looks like this:
Problem by Kushi Sharma and Ayla Muminovic
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
