Question: Write a program to read a text file that calculates average values of all successive numbers and returns result to output file. the last element
Write a program to read a text file that calculates average values of all successive numbers and returns result to output file.
the last element in row has to be left intact
ex input file has matrix:
1 3 4 6
2 1 2 5
resulting matrix will be
(1+3)/2 (3+4)/2 (4+6)/2 6
3/2 3/2 7/2 5
which is:
2 3.5 5 6
1.5 1.5 3.5 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
