Loops/Break: Difference between revisions

added Go
m (→‎{{header|J}}: whitespace)
(added Go)
Line 287:
 
end program Example</lang>
 
=={{header|Go}}==
<lang go>package main
import "fmt"
import "rand"
import "time"
 
func main() {
rand.Seed(time.Seconds())
for {
a := rand.Intn(20)
fmt.Println(a)
if a == 10 { break }
b := rand.Intn(20)
fmt.Println(b)
}
}</lang>
 
=={{header|Haskell}}==
Anonymous user