gokursu/structs/demo1.go

16 lines
227 B
Go
Raw Normal View History

2024-01-20 14:42:21 +03:00
package structs
import "fmt"
func Demo1() {
2024-01-20 14:53:20 +03:00
fmt.Println(product{name:"Computer", unitPrice: 5000, brand: "XYZ", discountRate: 20})
2024-01-20 14:42:21 +03:00
}
type product struct {
name string
unitPrice float64
brand string
2024-01-20 14:48:38 +03:00
discountRate int
}