CMPT 127 Lecture Notes - Lecture 12: Standard Streams
Document Summary
You can meet them with some quite simple, compact code. The main challenge here is formulating the problem as a computation. Re q u ire m e n ts: read a line containing three positive integer values greater than 0 from stdin. The values are separated by one or more spaces: the input is guaranteed to be well-formed, the values represent the width (x dimension), breadth (y dimension) and height (z dimension) of a symmetrical rectangular-based pyramid, respectively. In this view, x increases from left to right, and y increases from bottom to top: draw the outline of the pyramid with the "#" character. You"ll need to use a fixed-width font in your terminal for these shapes to look right in your output. (if the examples below don"t look symmetrical in your browser, check that your font is fixed-width. ) Te s tin g & s u b m is s io n.