Start from the line your compiler tells you and look upwards. Do you see any syntax errors? Hint: all statements must end in a semicolon.

Also, don't add comments like "// end for" to the ending...