Advertisement
cwchen

[Go] break demo.

Sep 16th, 2017
868
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.14 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5. )
  6.  
  7. func main() {
  8.     i := 1
  9.  
  10.     for {
  11.         fmt.Println(i)
  12.  
  13.         i += 1
  14.  
  15.         if i > 5 {
  16.             break
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement