ed
This commit is contained in:
parent
f79fa519a9
commit
a79fe7c843
|
|
@ -1,36 +1,13 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
const value = 10
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
var (
|
||||
i = 20
|
||||
f float64
|
||||
)
|
||||
|
||||
f = float64(i)
|
||||
fmt.Println(f)
|
||||
fmt.Println(i)
|
||||
|
||||
i = value
|
||||
f = value
|
||||
|
||||
fmt.Println(f)
|
||||
fmt.Println(i)
|
||||
|
||||
var (
|
||||
b byte = 129
|
||||
c int32 = 2_147_483_647
|
||||
d uint64 = 18_446_744_073_709_551_615
|
||||
)
|
||||
fmt.Println(b)
|
||||
fmt.Println(c)
|
||||
fmt.Println(d)
|
||||
|
||||
fmt.Println(b+1)
|
||||
fmt.Println(c+1)
|
||||
fmt.Println(d+1)
|
||||
}
|
||||
var total int
|
||||
for i := 0; i < 10; i++ {
|
||||
total = total + i
|
||||
fmt.Println(total)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user