Program Does Numerical Integration For Data Sets Located in an Input File. The Code has to be All C language no C++

Paste Bin Link to The Full Code

http://pastebin.com/NRVDqxdj

Could Someone Help Me With This:

Calculate the total area under the curve for this data set, starting with an h value of 0.1 and then continuing with h = 0.01, 0.001, etc. [b]until the latest two calculations are within 0.0005 of each other, or h becomes 0.00001.[/b] For each of these calculations report the h value, the value of N and the area calculated.

The Section in Bold is The Bit Where im Confused on How to Do It

Another Problem Im Having is Creating My Own Functions:

These Calculations I Want in Functions But Can't Figure It Out

```
for ( Height = 0.1; Height >= 0.00001; Height = Height * 0.1 ){
N = (X_Final - X_Initial) / ( Height ) + ( 0.5 );
X_a = X_Initial;
Area_Total = 0;
for ( int i = 0 ; i < N ; i++){
X_b = X_a + Height;
Area_i = Height * (abs(X_a*X_a + B*X_a + C + D/X_a) + abs(X_b*X_b + B*X_b + C + D/X_b)) * 0.5;
Area_Total = Area_i + Area_Total;
X_a = X_b;
}
```

Also if You See anything Else That Needs Fixing Can You Please Post it

- Such as The Formatting

Thanks In Advance