分类: Web开发
2013-02-01 23:26:39
package main import ( "fmt" "strings" ) func main() { /* for i := 1; i<=100; i++ { fmt.Println(strings.Repeat("A", i)) } for i := 1; i<=100; i++ { switch { case i%3==0 && i%5==0 : fmt.Println("FizzBuzz") case i%5==0: fmt.Println("Buzz") case i%3==0: fmt.Println("Fizz") default: fmt.Println(i) } } for i := 0; i<10; i++ { fmt.Println(i) } var i int LOOP: if i < 10 { fmt.Println(i) i += 1 goto LOOP } var arr [10]int for i := range arr { fmt.Println(i) } */ }