Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started