I'm looking for help with the following problem. In this problem, As is the # of darts thrown and is entered by the user. I want to create code where for every dart thrown, assign a random x and y. If x and y are less than or equal to one. increase area of dart board (Ac) by 1. Then use Ac to calculate Pi.

I can't get this to compile. Any help?:confused:

import java.io.*;

import java.util.Random;

public class DartsCircle

{

public static void main(String[] args) throws IOException

{ //listing of variables

BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));

double x, y, Pi, As, Ac;

String strAs;

for (As

x = Math.random();

y = Math.random();

Ac=0)

if 1 <= ((x*x) + (y*y)); Ac++;

System.out.println("Enter the number of darts");

strAs = dataIn.readLine();

As = Double.parseDouble(strAs);

Pi = (4*Ac)/As;

System.out.println("Pi =" + Pi);

}

}