Advertisement
Spocoman

Cat Expenses

Oct 3rd, 2024 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.36 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var bedPrice, toiletPrice float64
  7.     fmt.Scanln(&bedPrice)
  8.     fmt.Scanln(&toiletPrice)
  9.    
  10.     foodPrice := toiletPrice * 1.25
  11.     toyPrice := foodPrice / 2
  12.     vetPrice := toyPrice * 1.1
  13.  
  14.     sum := (toiletPrice + foodPrice + toyPrice + vetPrice) * 12 * 1.05 + bedPrice
  15.  
  16.     fmt.Printf("%.2f\n", sum)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement