CMPT 127 Lecture Notes - Lecture 11: Terminal Emulator, Newline, Standard Streams

148 views2 pages

Document Summary

Write a small program that could be useful in the real world. Requirements: read an arbitrary number of positive integer values from stdin. The number of hashes printed should be equal to the input value: your program should output exactly one line per input value, the value zero should generate an empty line, i. e. just a newline character, ignore empty lines. Do not output a newline for an empty line. Again your and output are interleaved in the terminal window, so the appearance of a run of a correct program with first example above is: But the third example is more messy since the input contained several lines: In the next lab we will see how to use files with stdin and stdout to avoid this unsightly mess. Don"t forget the requirement that the program accepts arbitarily large input, including empty and very large.

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

Related Questions