for

作者: BANGBANGNT | 来源:发表于2017-12-07 12:01 被阅读0次
    package main
    
    import "fmt"
    
    func main() {
        i := 1
        for i <= 3 {
            fmt.Println(i)
            i = i + 1
        }
    
        for j := 7; j <= 9; j++ {
            fmt.Println(j)
        }
    
        for {
            fmt.Println("loop")
            break
        }
    
        for n := 0; n <= 5; n++ {
            if n%2 == 0 {
                continue
            }
            fmt.Println(n)
        }
    }
    
    

    相关文章

      网友评论

          本文标题:for

          本文链接:https://www.haomeiwen.com/subject/uvddixtx.html