kk
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module main.go
|
||||
|
||||
go 1.24.4
|
||||
@@ -0,0 +1,26 @@
|
||||
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())
|
||||
}
|
||||
Reference in New Issue
Block a user