This commit is contained in:
2023-09-27 12:45:28 +02:00
parent 210080fe2f
commit c0e9c85775
7 changed files with 35 additions and 2 deletions

View File

@@ -1,10 +1,11 @@
package main
import "fmt"
const secondsInHour = 3600
func main(){
fmt.Println("Hello Go World!!")
distance := 60.8 //distance in km
distance := 60.8
fmt.Printf("the distance in miles is %f \n", distance * 0.621)
}

BIN
Section3/ex2 Executable file

Binary file not shown.

9
Section3/exercice1.go Normal file
View File

@@ -0,0 +1,9 @@
package main
import "fmt"
func main() {
a := 1
b := 2
fmt.Println(a, b)
}

10
Section3/exercice2.go Normal file
View File

@@ -0,0 +1,10 @@
package main
import "fmt"
func main() {
a := 1
b := 2
c := a + b
fmt.Println("The addition of ", a, " and ", b, " is ", c)
}

13
Section3/exercice6.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import "fmt"
func main() {
SayHello()
}
func SayHello() {
fmt.Println("Hello package v1.0.0!")
var x int = 10
_ = x
}

BIN
Section3/my_first_go_app Executable file

Binary file not shown.

BIN
Section3/my_go_program_mac Executable file

Binary file not shown.