Use the file below: Write a program to read data from input file. The first value read
Fantastic news! We've Found the answer you've been seeking!
Question:
Use the file below: Write a program to read data from input file. The first value read is the number of numbers to be read next. Calculate average of those numbers and write to an output file the numbers read and the average. Repeat this process until end of file. Use of member function,
Sample of input file: NAME YOUR FILE
" Lab4input.dat" for input file
"Lab4output.dat" for output file
4 12 14 99 83 5 2 9 56 4 3 2 13 15 1 6 8 32 12 3 4 5 12 34 45
Output should look like this:
12 14 99 83
Number of numbers read=4
Average=52
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date: