A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer.
Fantastic news! We've Found the answer you've been seeking!
Question:
A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that reads through the file, ignoring those value that are not bigger than the maximum value read up to that point. The numbers that are NOT ignored are added, and their sum stored in a variable called runsum.
Related Book For
Introduction to Mathematical Statistics and Its Applications
ISBN: 978-0321693945
5th edition
Authors: Richard J. Larsen, Morris L. Marx
Posted Date: