Answered step by step
Verified Expert Solution
Link Copied!

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 100 real numbers.
Read all 100 numbers into a two-dimensional array of 10 rows and 10 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 ([0][0] to 99).
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 ([0][9] to
[9](0]) 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago