Advertisement
Spocoman

Godzilla vs. Kong

Oct 10th, 2024 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.61 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var budget float64
  7.     fmt.Scanln(&budget)
  8.    
  9.     var statists int
  10.     fmt.Scanln(&statists)
  11.  
  12.     var dresses float64
  13.     fmt.Scanln(&dresses)
  14.    
  15.     decors := budget / 10
  16.  
  17.     if statists > 150 {
  18.         dresses *= 0.9
  19.     }
  20.  
  21.     price := decors + float64(statists) * dresses
  22.  
  23.     if budget >= price {
  24.         fmt.Println("Action!")
  25.         fmt.Printf("Wingard starts filming with %.2f leva left.", budget - price)
  26.     } else {
  27.         fmt.Println("Not enough money!")
  28.         fmt.Printf("Wingard needs %.2f leva more.", price - budget)
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement