Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- )
- func main() {
- var guests, budget int
- fmt.Scanln(&guests)
- fmt.Scanln(&budget)
- budget -= guests * 20
- if (budget < 0) {
- fmt.Printf("They won't have enough money to pay the covert. They will need %d lv more.", budget * -1)
- } else {
- fmt.Printf("Yes! %d lv are for fireworks and %d lv are for donation.",
- int(math.Round(0.40 * float64(budget))), int(math.Round(0.60 * float64(budget))))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement