push all exercices
This commit is contained in:
BIN
ch2/1/ch2.exe
Normal file
BIN
ch2/1/ch2.exe
Normal file
Binary file not shown.
10
ch2/1/const_declarations.go
Normal file
10
ch2/1/const_declarations.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var i int64 = 20
|
||||
var f float64 = float64(i)
|
||||
fmt.Println(i)
|
||||
fmt.Println(f)
|
||||
}
|
||||
3
ch2/1/go.mod
Normal file
3
ch2/1/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module ch2
|
||||
|
||||
go 1.25.0
|
||||
BIN
ch2/2/ch2_2.exe
Normal file
BIN
ch2/2/ch2_2.exe
Normal file
Binary file not shown.
11
ch2/2/ch2_2.go
Normal file
11
ch2/2/ch2_2.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
const value = 15
|
||||
var i int = value
|
||||
var f float64 = value
|
||||
fmt.Println(i)
|
||||
fmt.Println(f)
|
||||
}
|
||||
3
ch2/2/go.mod
Normal file
3
ch2/2/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module ch2_2
|
||||
|
||||
go 1.25.0
|
||||
BIN
ch2/3/ch2_3.exe
Normal file
BIN
ch2/3/ch2_3.exe
Normal file
Binary file not shown.
15
ch2/3/ch3_2.go
Normal file
15
ch2/3/ch3_2.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var b byte = 255
|
||||
var smallI int32 = 2147483647
|
||||
var bigI uint64 = 18446744073709551615
|
||||
b += 1
|
||||
smallI += 1
|
||||
bigI += 1
|
||||
fmt.Println(b)
|
||||
fmt.Println(smallI)
|
||||
fmt.Println(bigI)
|
||||
}
|
||||
3
ch2/3/go.mod
Normal file
3
ch2/3/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module ch2_3
|
||||
|
||||
go 1.25.0
|
||||
Reference in New Issue
Block a user