Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) The file numbers.dat contains random numbers between 0 and 1. Write a program

ID: 3569257 • Letter: 1

Question

1) The file numbers.dat contains random numbers between 0 and 1. Write a program that reads all numbers and calculates average, maximum, and minimum of all numbers; it should also count number of data in numbers.dat. The average should be sent out with 3 decimal places. The program should send the results into an output file.

2)The file numbers.dat contains 1000 random numbers between 0 and 1. Write a program that reads all numbers and write numbers to another file. The output file should have 10 numbers in each row. The distance between numbers should be 2 spaces. Use 3 decimal places for all numbers.

3) Write a program that reads numbers from two different files and then write them to a third file. The program writes the data from first file and then adds data from the second file. Assume number of data in each file is unknown.

Explanation / Answer

1)

3)