Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

10. Why have centrally planned economies failed? LOP8

Answered: 1 week ago

Question

How might the bank solve this problem? LOP8

Answered: 1 week ago