Advertisement
Spocoman

05. Godzilla vs. Kong

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