As in C or Java, you can leave the pre and post statements empty.
package main import "fmt" func main() { sum := 1 for ; sum < 1000; { sum += sum } fmt.Println(sum) }
时间: 2024-11-03 21:26:17
As in C or Java, you can leave the pre and post statements empty.
package main import "fmt" func main() { sum := 1 for ; sum < 1000; { sum += sum } fmt.Println(sum) }