diff --git a/approximate-pi.c b/approximate-pi.c index 6742590..cff7d98 100644 --- a/approximate-pi.c +++ b/approximate-pi.c @@ -1,3 +1,4 @@ +#include #include #include @@ -19,7 +20,12 @@ double approximate_pi(unsigned int steps) { int main(int argc, char *argv[]) { // printf("sizeof(int) = %d\n", sizeof(int)); - printf("pi = %8.7f\n", approximate_pi(10000000)); + + double mypi = approximate_pi(100000000); + + printf("pi = %8.7f\n", mypi); + assert(mypi > 3.141); + assert(mypi < 3.142); return 0; }