CMPT 127 Lecture Notes - Lecture 1: Standard Streams, Scanf Format String, Newline

338 views1 pages

Document Summary

An exercise in computing elementary statistics over a set of input values. You will need to loop over a scanf() and check its return value to detect the end of the input. Read floating point values from stdin, each separated by a newline, and terminated by. The input values are in the range [-100,000 to +100,000]. The input will contain at least one floating-point value. The input may contain blank lines: these should be ignored. Apart from possible blank lines, the input is otherwise well-formed. 3. the smallest value seen the largest value seen the arithmetic mean of all the values seen all accurate to two decimal places. The output values must be separated by a single space character and followed by a newline character. Note that you do not have handle arbitrary text in the input: only well-formed numbers and empty lines.

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