Hey,

I'm really stuck on a program I have to make for a class. We have to integrate f(x) = cos^2 (x). We are given a file with values of x and corresponding values of f(x). We have to use a while loop to do the following sum:

sum to infinity: f(xj−1)(xj − xj−1)

What I'm really stuck on at the moment is what to do with the values once my program has opened them. It also asks me to do this in an external function and I have no clue what that means and I can't find anything on it in my books or notes!

Sorry if I am being stupid

Ok I have figured out external functions, just the other part now