Skip to content

Commit

Permalink
Update Cosmetic.go
Browse files Browse the repository at this point in the history
  • Loading branch information
rukinapolina authored Dec 18, 2024
1 parent d65b63e commit 2a896d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion golang/lab7/Cosmetic.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (c Cosmetic) GetPrice() float32 {
return c.Price
}

func (c *Cosmetic) Sale(x float32) {
func (c *Cosmetic) ApplyDiscount(x float32) {
(*c).Price = (c.Price / 100) * (100 - x)
}

Expand Down

0 comments on commit 2a896d4

Please sign in to comment.