A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-104.go
1packagemain
2
3import"fmt"
4
5funcmain(){
6outer:
7fori:=0;i<3;i++{
8forj:=0;j<3;j++{
9ifj==1{
10continueouter
11}
12fmt.Print(i,j," ")
13}
14}
15fmt.Println()
16}
Iteration
Answer & explanation
Console output
0 0 1 0 2 0
Why
A labeled continue resumes the loop named by the label, here the outer loop. For each i the inner loop prints only at j == 0, then j == 1 triggers continue outer, abandoning the inner loop and moving to the next i. fmt.Print inserts a space between the two integer operands, so each pair shows as "i j".