push all exercices

This commit is contained in:
lbenedar
2026-02-21 14:09:13 +03:00
commit a94d994b8c
72 changed files with 787 additions and 0 deletions

BIN
ch6/1/ch6_1.exe Normal file

Binary file not shown.

22
ch6/1/ch6_1.go Normal file
View File

@@ -0,0 +1,22 @@
package main
import "fmt"
type Person struct {
FirstName string
LastName string
Age int
}
func MakePerson(firstName, lastName string, age int) Person {
return Person{firstName, lastName, age}
}
func MakePersonPointer(firstName, lastName string, age int) *Person {
return &Person{firstName, lastName, age}
}
func main() {
fmt.Println(MakePerson("Ivan", "Ivanov", 21))
fmt.Println(*MakePersonPointer("Peter", "Petrov", 22))
}

3
ch6/1/go.mod Normal file
View File

@@ -0,0 +1,3 @@
module ch6_1
go 1.25.0