Advertisement
Spocoman

Charity Campaign

Oct 4th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.39 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var days, cookers, cakes, waffles, pancakes int
  7.     fmt.Scanln(&days)
  8.     fmt.Scanln(&cookers)
  9.     fmt.Scanln(&cakes)
  10.     fmt.Scanln(&waffles)
  11.     fmt.Scanln(&pancakes)
  12.    
  13.     sum := float64(days * cookers) * (float64(cakes) * 45.00 + float64(waffles) * 5.80 + float64(pancakes) * 3.20)
  14.    
  15.     fmt.Printf("%.2f\n", sum - sum / 8)
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement