Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- )
- func main() {
- var racketPrice float64
- fmt.Scanln(&racketPrice)
- var racketCount, sneakersCount int
- fmt.Scanln(&racketCount)
- fmt.Scanln(&sneakersCount)
- racketsSum := racketPrice * float64(racketCount)
- sneakersSum := racketPrice / 6 * float64(sneakersCount)
- price := (racketsSum + sneakersSum) * 1.2
- fmt.Printf("Price to be paid by Djokovic %d\n", int(price / 8))
- fmt.Printf("Price to be paid by sponsors %d\n", int(math.Ceil(price * 7 / 8)))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement