Loop Problem
Theres something wrong w/ this that wont let me compile. Can you not do for loops nested in if statements?
//Places the live cells randomly.
if (anwer.equals("random")
for (int x = 0; x < number; x++)
{r = generator.nextInt(number);
c = generator.nextInt(number);
cell[r][c] = 1;
}
//Prompts the user to specify where the live cells will be placed and then places them.
else
for (int x = 0; x < number; x++)
{System.out.println("Enter the row of the number to be placed: ");
r = scan.nextInt();
System.out.println("Enter the column of the number to be placed: ");
c = scan.nextInt();
cell[r][c] = 1;
}

