View Single Post
  #1 (permalink)  
Old 10-14-2006, 10:38 PM
tim838 tim838 is offline
Newbie
 
Join Date: Oct 2006
Posts: 1
Credits: 0
Rep Power: 0
tim838 is on a distinguished road
Default Generate random points

Hi,
I'm new to programming and am using BlueJ. I'm trying to generate n random points with [x,y] co-ords each in the range (0,1).

double[] location = new double [n];
for (i=0;i<n;i++){
location[i]=Math.random();

is what i was thinking however this does not work since i is not defined properly. I'm a little confused, any help would be appreciated.

Thanks
Reply With Quote

Sponsored Links