Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _pages/2019/ap/problems/mario/more/mario.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ image:pyramids.png[Super Mario Brothers, width="50%"]
== Specification

* Write, in a file called `mario.c` in your `~/chapter1/mario/` directory, a program that recreates these half-pyramids using hashes (`#`) for blocks.
* To make things more interesting, first prompt the user for the half-pyramid's height, a non-negative integer no greater than `23`. (The height of the half-pyramids pictured above happens to be `4`, the width of each half-pyramid `4`, with an a gap of size `2` separating them.)
* If the user fails to provide a non-negative integer no greater than `23`, you should re-prompt for the same again.
* To make things more interesting, first prompt the user for the half-pyramid's height, a non-negative integer no greater than `8`. (The height of the half-pyramids pictured above happens to be `4`, the width of each half-pyramid `4`, with an a gap of size `2` separating them.)
* If the user fails to provide a non-negative integer no greater than `8`, you should re-prompt for the same again.
* Then, generate (with the help of `printf` and one or more loops) the desired half-pyramid.
* Take care to left-align the bottom-left corner of the left-hand half-pyramid with the left-hand edge of your terminal window.

Expand Down