This commit is contained in:
a.pivkin
2025-07-16 08:15:26 +03:00
parent cebbf27b3a
commit 0635aaa5ae
53 changed files with 76 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
package rectangle
type Rect struct {
A,B int
color string
}
func New(newA int, newB int, newColor string) *Rect {
return &Rect{newA,newB,newColor}
}
func (r *Rect) Perimeter() int {
return 2 * (r.A + r.B)
}