We can approximate the area of the shaded region by drawing 1000 rectangles having base vertices atand computing the sum of the areas of the 1000 rectangles. The base of each rectangle is, and the height of each rectangle is given by
The following comuter program will comute and add the areas of the 1000 rectangles.In lineis the height of each rectangle.In line40 , A gives the current total of all the areas.
If the program is run, the computer will print AREA IS APPROXIAMTELY .