help with array

Posted by JohnWong on Stack Overflow See other posts from Stack Overflow or by JohnWong
Published on 2010-04-16T00:49:58Z Indexed on 2010/04/16 0:53 UTC
Read the original article Hit count: 285

Filed under:
|

You will write a program that evaluates the integral of sin(x) using the left-hand rectangle rule with 2000 subintervals, over 10 intervals. The intervals to test are [0, 1), [1, 2), …, [8, 9), [9, 10). You will declare an array of type double that can hold 10 elements, and you will use this array to hold all 10 results you get from evaluating each interval.

I am in testing my code, what should be the output? For example, [0, 1)? Any idea?

Thanks.

© Stack Overflow or respective owner

Related posts about c++

Related posts about array