Advertisement
Spocoman

Tennis Equipment

Oct 13th, 2024
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.55 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.   "fmt"
  5.   "math"
  6. )
  7.  
  8. func main() {
  9.     var racketPrice float64
  10.     fmt.Scanln(&racketPrice)
  11.    
  12.     var racketCount, sneakersCount int
  13.     fmt.Scanln(&racketCount)
  14.     fmt.Scanln(&sneakersCount)
  15.    
  16.     racketsSum := racketPrice * float64(racketCount)
  17.     sneakersSum := racketPrice / 6 * float64(sneakersCount)
  18.     price := (racketsSum + sneakersSum) * 1.2
  19.  
  20.     fmt.Printf("Price to be paid by Djokovic %d\n", int(price / 8))
  21.     fmt.Printf("Price to be paid by sponsors %d\n",  int(math.Ceil(price * 7 / 8)))
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement