Question: for a c program, please solve: A data file named ( sample file here ) contains 1 0 0 real numbers. Read all 1 0
for a c program, please solve: A data file named sample file here contains real numbers.
Read all numbers into a twodimensional array of rows and columns. No algorithm is necessary for this problem. Write a personal Tibrary of functions named mylibrary.h containing the following functions:
sumdiag: sums all the numbers in the main diagonal of the array to
sumall: sums all the numbers in the array.
avright: calculates the average of the last rightmost column of the array. corners: sums the four corners of the array.
largeanti: returns the largest number found in the antidiagonal to
of the array.
In the main program, read the file into the array, call the five functions and write the five numbers that are the result of the five functions into a binary file named results.bin.
Finally, read the five numbers from the binary file and display the results in sentences with one decimal precision.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
