starting go by example
This commit is contained in:
19
5-go-by-example/2-values.go
Normal file
19
5-go-by-example/2-values.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
// Strings
|
||||
fmt.Println("go" + "lang")
|
||||
|
||||
// Integers
|
||||
fmt.Println("1+1 =", 1+1)
|
||||
|
||||
// Floats
|
||||
fmt.Println("7.0/3.0 =", 7.0/3.0)
|
||||
|
||||
//Boolean with operators
|
||||
fmt.Println(true && false)
|
||||
fmt.Println(true || false)
|
||||
fmt.Println(!true)
|
||||
}
|
||||
Reference in New Issue
Block a user