Исходники и презентации

This commit is contained in:
2025-05-23 07:26:39 +03:00
parent aa948179d5
commit 02d8430a3a
514 changed files with 13773 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package main
import "fmt"
type customer1 struct {
balance int
}
func (c customer1) add(value int) {
c.balance += value
}
type customer2 struct {
balance int
}
func (c *customer2) add(value int) {
c.balance += value
}
func main() {
c1 := customer1{}
c1.add(100)
c2 := customer2{}
c2.add(100)
fmt.Println(c1)
fmt.Println(c2)
}