Section4.19
This commit is contained in:
22
Section4/zero_values/main.go
Normal file
22
Section4/zero_values/main.go
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
var a = 4
|
||||||
|
var b = 5.2
|
||||||
|
|
||||||
|
a = int(b)
|
||||||
|
|
||||||
|
fmt.Println(a, b)
|
||||||
|
|
||||||
|
//var x int
|
||||||
|
//x = "5"
|
||||||
|
|
||||||
|
var value int
|
||||||
|
var price float64
|
||||||
|
var name string
|
||||||
|
var done bool
|
||||||
|
fmt.Println(value, price, name, done)
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user