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

20
ch6/3/ch6_3.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import "fmt"
type Person struct {
name string
age int
}
func MakePerson(name string, age int) Person {
return Person{name, age}
}
func main() {
personSlice := make([]Person, 0, 512)
for i := 0; i < 10_000_000; i++ {
personSlice = append(personSlice, MakePerson("aaa", i))
}
fmt.Println(personSlice[:100])
}