Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var penPrice = 5.80
- var markerPrice = 7.20
- var detergentPrice = 1.20
- var penCount, markerCount, detergentCount, discount float64
- fmt.Scanln(&penCount)
- fmt.Scanln(&markerCount)
- fmt.Scanln(&detergentCount)
- fmt.Scanln(&discount)
- var totalPrice = (1 - discount / 100) * (penCount * penPrice + markerCount * markerPrice + detergentCount * detergentPrice)
- fmt.Println(totalPrice)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement