#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
double frand(void)
{
return(double)rand()/0x8000;
}

int main(void)
{
int  n ;
double x ,y, pi;
srand(time(NULL));
n =0;
pi =0.0;
while( n <=10000)
{
x =frand();
y =frand();
n++;
if(x*x + y*y <=1.0){
 pi += 0.0001;
 printf("%f ,%f\n", x ,y);}
 }
printf("pi =%f",4*pi);
return (0);
}