learning_go/spec_course/Lec18/figure/main.go
a.pivkin 0635aaa5ae kk
2025-07-16 08:15:26 +03:00

26 lines
272 B
Go

package main
import (
"fmt"
"math"
)
type Cicle struct {
radius int
}
type Rectangle struct {
lenght,width int
}
func (circle Cicle) Perim() float64 {
return float64(circle.radius) * math.Pi
}
func main() {
c := Cicle{
radius: 3,
}
fmt.Println(c.Perim())
}