Compare commits
No commits in common. "7af8fab3df192c42508e16c2d6ede315305f30c0" and "dfe937fc42293d7df21f82ba7630bdfd7ad66fd5" have entirely different histories.
7af8fab3df
...
dfe937fc42
5 changed files with 0 additions and 90 deletions
|
@ -1,7 +0,0 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello World")
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("concat" + " " + "strings")
|
||||
fmt.Println("1 + 1 =", 1 + 1)
|
||||
fmt.Println("7.0 / 3.0 =", 7.0 / 3.0)
|
||||
fmt.Println(true && false)
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var a = "initial"
|
||||
fmt.Println(a)
|
||||
|
||||
a = "changed"
|
||||
fmt.Println(a)
|
||||
|
||||
var b, c int = 1, 2
|
||||
fmt.Println("b=", b, ", c=", c)
|
||||
|
||||
var d = true
|
||||
fmt.Println(d)
|
||||
|
||||
var e int
|
||||
fmt.Println(e)
|
||||
|
||||
f := "short"
|
||||
fmt.Println(f)
|
||||
|
||||
f = "changed short"
|
||||
fmt.Println(f)
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
)
|
||||
|
||||
const s string = "this is a constant"
|
||||
|
||||
func main() {
|
||||
fmt.Println(s)
|
||||
|
||||
const n = 500000000
|
||||
const d = 3e20 / n
|
||||
|
||||
fmt.Println(d)
|
||||
fmt.Println(int64(d))
|
||||
fmt.Println(math.Sin(n))
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
i := 1
|
||||
for i <= 3 {
|
||||
fmt.Println("number i =", i)
|
||||
i = i + 1
|
||||
}
|
||||
|
||||
for j := 0; j < 3; j++ {
|
||||
fmt.Println("number j =", j)
|
||||
}
|
||||
|
||||
for {
|
||||
fmt.Println("loop with no condition")
|
||||
break
|
||||
}
|
||||
|
||||
for n := range 6 {
|
||||
if n%2 == 0 {
|
||||
fmt.Println("even number n = ", n)
|
||||
continue
|
||||
}
|
||||
fmt.Println("odd number n = ", n)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue