Question: PLEASE USE very simple C programming. NO STRINGS AND PLEASE USE printf and scanf instead of cout and cin. Thank you so much 3. The

 PLEASE USE very simple C programming. NO STRINGS AND PLEASE USE
PLEASE USE very simple C programming. NO STRINGS AND PLEASE USE printf and scanf instead of cout and cin. Thank you so much

3. The flow of toxie waste through a permeable media (egsil) can be modeled using differential equations (e.g. Darcy's Law). However, the differential equations are hard to solve when the permeability changes from point to point (as in a real soil). One solution to the problem is to represent the permeability as sotne sort of effective average Suppose that we have n permeability readings xo], . .. z array x. Three possible averages are commonly used, depending on the nature of the toxic low problem; , xn-1] stored in the arithmetic average = geometric average explogl harmonic average Write a program, permeability.c, which computes the three averages for a set of values stored in the file samples.txt. You can assume that the number of values in the input file is kess than 100 Your sain must use the following steps: e open the two files samples.txt and sanplesout.txt e read the values from samples.txt into an array x and determine the value of n (mber of values in the file). call three functions arithmetic, geometric and harmonic to compute the corresponding averages e write the three averages to the file sanplesout.txt To check your program, your arithmetic average should be 20.189125, your harmonic average should be 15.677883 and your geometric average should be between these two values / File: permeability.c A set of permeabilities is read fron a file into an array Three functions are called to compute the arithmetic, geometric and harmonic average Assigasent: 5 Programer Date Question:3 DalID: Course: ENCM 1081 #include #include

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!