Ashy A.

asked • 11/01/20

comp sci question

Write a program that produces an ASCII art representation of an hourglass using nested for loops. Use a class constant to make it possible to change the height of the hourglass.


Output when a class constant named SIZE is set to a value of 2:

|======|

\[4 spaces]/

\[2 spaces]/

||

/::\

/::::\

|======|

Output when a class constant named SIZE is set to a value of 3:

|========|

\[[6 spaces]/

\[4 spaces]/

\[2 spaces]/

||

/::\

/::::\

/::::::\

|========|



please put the amount of spaces that is stated in the place of the square brackets (and the stuff within them)

Patrick B.

tutor
source code uploaded to RESOURCES under this link
Report

11/01/20

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.