CMPT 127 Lecture Notes - Lecture 12: Standard Streams

134 views2 pages

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.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents