(50%) Exercise 4.26 (page 143) of Chapter 4.
You don't need to print out the whole table; just print out
the number of terms and corresponding PI values when
certain levels are reached. A sample output list is as
follows:
# of terms PI value
119 3.149995866593470 ---> 3.14 is reached when 119 terms are added.
1688 3.141000236580159 ---> 3.141 is reached when 1688 terms are added.
10794 3.141500009528466 ---> 3.1415 is reached when 10794 terms are added.
136121 3.141599999994786 ---> 3.14159 is reached when 136121 terms are added.
Note that this is typical numerical computation;
the numbers of terms obtained from your computer may be different
from mine due to computer truncation/round-off errors.