gokursu/main.go

53 lines
1.0 KiB
Go
Raw Normal View History

2024-01-04 10:30:51 +03:00
package main
import (
"fmt"
2024-01-10 17:05:43 +03:00
"golesson/arrays"
2024-01-04 10:30:51 +03:00
"golesson/conditionals"
"golesson/examplerange"
2024-01-14 00:12:27 +03:00
"golesson/functions"
2024-01-04 10:30:51 +03:00
"golesson/loops"
2024-01-16 02:25:45 +03:00
"golesson/maps"
2024-01-20 11:11:46 +03:00
"golesson/pointers"
2024-01-10 17:05:43 +03:00
"golesson/slices"
2024-01-04 10:30:51 +03:00
"golesson/variables"
)
func main() {
variables.Demo1()
fmt.Print()
conditionals.Demo3()
2024-01-04 18:32:09 +03:00
loops.Demo5()
2024-01-10 11:23:21 +03:00
arrays.Demo4()
2024-01-11 11:36:53 +03:00
slices.Demo2()
functions.SayHello("Mert Gör")
2024-01-16 02:25:45 +03:00
functions.Addition(2, 6)
var total = functions.Addition(3, 8)
2024-01-14 00:26:50 +03:00
fmt.Println(total)
2024-01-14 00:30:12 +03:00
fmt.Println(total * 10)
2024-01-16 02:25:45 +03:00
result1, result2, result3, result4 := functions.MathOps(10, 2)
2024-01-14 13:18:27 +03:00
fmt.Println("Add :", result1)
fmt.Println("Subtract :", result2)
fmt.Println("Multiply : ", result3)
fmt.Println("Divide : ", result4)
2024-01-16 02:25:45 +03:00
var result = functions.AddVariadic(1, 3, 4, 5, 3)
2024-01-14 17:29:53 +03:00
fmt.Println(result)
2024-01-14 17:31:00 +03:00
2024-01-16 02:25:45 +03:00
fmt.Println(functions.AddVariadic(1, 3, 4))
2024-01-14 17:34:18 +03:00
2024-01-16 02:25:45 +03:00
numbers_main := []int{1, 2, 3, 4}
2024-01-14 17:34:18 +03:00
fmt.Println(functions.AddVariadic(numbers_main...))
2024-01-16 02:25:45 +03:00
maps.Demo1()
examplerange.Demo1()
examplerange.Demo2()
2024-01-17 12:41:04 +03:00
examplerange.Demo3()
2024-01-20 11:11:46 +03:00
number := 20
2024-01-20 11:17:16 +03:00
pointers.Demo1(&number)
2024-01-20 11:11:46 +03:00
fmt.Println("Number in Main go file", number)
2024-01-20 11:17:16 +03:00
2024-01-04 10:30:51 +03:00
}