1) you are missing the closing bracket 2) you need a diff iterator (not i) for inner loop, because you are setting i back to 1 every time, which will never let the outer loop get to 3, so the loop will go on infinitly.
I suspect that this doesn't even compile, am I correct? The reason is that the computer thinks you are declaring the same variable (i) twice, as Logain said. So you need to change the variable used in the inner loop. Typically j is used in such situations.