Beispiel #1
0
int
main(void)
{
    double point_count = 0;
    printf("Enter point count: ");
    scanf("%lf", &point_count);
    printf("Pi =  %lf \n", pi_monte_carlo(point_count));
    return (0);
}
Beispiel #2
0
int main (void)
{
	
	double		pi;
	int			cnt;
	
	double pi_monte_carlo(int cnt);
	int is_in_circle(double x,double y);
	
	printf("Please input a number:\n");
	scanf("%d",&cnt);
	
	pi=pi_monte_carlo(cnt);
	printf("%f",pi);
	
	return 0;
}