Monte Carlo

import java.util.Scanner;
import java.util.Random;

public class MonteCarlo {
    private static Scanner input;
    static double montePI(int n)
    {
        int i,sum;
        double PI;
        double x, y;
        sum=0;
        
        Random r=new Random();
        for(i=1;i

你可能感兴趣的:(Monte Carlo)