February 2017
Beginner
1056 pages
28h 57m
English
Practice Programs can generally be solved with a short program that directly applies the programming principles presented in this chapter.
Write a program that searches a file of numbers and displays the largest number, the smallest number, and the average of all the numbers in the file. Do not assume that the numbers in the file are in any special order. Your program should obtain the file name from the user. Use either a text file or a binary file. For the text-file version, assume one number per line. For the binary-file version, use numbers of type double that are written using writeDouble.
Write a program ...
Read now
Unlock full access