Initial Commit
This commit is contained in:
commit
4f8ef2a312
4 changed files with 45 additions and 0 deletions
11
l0.go
Normal file
11
l0.go
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("hello moto")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
9
malacandra.go
Normal file
9
malacandra.go
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
const dist = 56000000
|
||||||
|
|
||||||
|
fmt.Printf("You'd reach Malacandra in 28 days if you travelled %v km/h", dist/28/24)
|
||||||
|
}
|
9
mars.go
Normal file
9
mars.go
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("My weight on the surface of Mars is", 155, "lbs, and I would be", 24 * 365/687, "years old")
|
||||||
|
}
|
16
rand.go
Normal file
16
rand.go
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
rand.Seed(time.Now().UnixNano())
|
||||||
|
var num = rand.Intn(10) + 1
|
||||||
|
fmt.Println(num)
|
||||||
|
|
||||||
|
num = rand.Intn(10) + 1
|
||||||
|
fmt.Println(num)
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue