๋ฐ์ํ
; ์ ์๋ตํ ์ ์๋ค๋ ์ ์์ C์ while ์ Go์์ for ๋ก ์ฐ์ธ๋ค.
์์
package main
import "fmt"
func main() {
sum := 1
for sum < 1000 {
sum += sum
}
fmt.Println(sum)
}
[์ฐธ๊ณ ์ฌ์ดํธ - a Tour of Go]
๋ฐ์ํ
'Data Base > Go' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Golang] Switch (0) | 2021.11.01 |
---|---|
[Golang] if๋ฌธ (0) | 2021.11.01 |
[Golang] for ๋ฐ๋ณต๋ฌธ (0) | 2021.11.01 |
[Golang] Zero values , Nil slices (0) | 2021.11.01 |
[์ฝ๊ณ ๋น ๋ฅธ Go ์์ํ๊ธฐ] #1.11 Structs (0) | 2021.10.29 |
๋๊ธ