learning_go/Lec18/figure/main.go
2025-07-14 06:14:06 +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())
}