/* montecarlo approximation of pi in c */ #include #include #include #include #define ITERATIONS 100000000 int in_circle(float x, float y) { if (sqrt(x*x + y*y) <= 1.0) { return 1; } return 0; } int main() { srand(time(NULL)); rand(); int hits=0; for (int i=0; i