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;

}

[1150 byte] By [MacMurphya] at [2007-11-27 3:37:07]
# 1
if (anwer.equals("random")unmatched parens!
DrLaszloJamfa at 2007-7-12 8:40:23 > top of Java-index,Java Essentials,Java Programming...
# 2
Wow. Always something stupid that I cant seem to see. Thanks.
MacMurphya at 2007-7-12 8:40:23 > top of Java-index,Java Essentials,Java Programming...