Tradicional for and Label for implemented
This commit is contained in:
parent
8215254b41
commit
3c71c22739
|
|
@ -89,6 +89,33 @@ pub fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
println(num)
|
println(num)
|
||||||
|
|
||||||
|
// ==================================== //
|
||||||
|
|
||||||
|
for k := 0; k < 10; k += 2 {
|
||||||
|
if k == 6 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
println(k)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================================== //
|
||||||
|
|
||||||
|
outer: for j := 4; true; j++ {
|
||||||
|
println(j)
|
||||||
|
|
||||||
|
for {
|
||||||
|
if j < 7 {
|
||||||
|
continue outer
|
||||||
|
}else {
|
||||||
|
break outer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================================== //
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue