Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- )
- func main() {
- var people int
- fmt.Scanln(&people)
- var entrancePrice, deskChairPrice, umbrellaPrice float64
- fmt.Scanln(&entrancePrice)
- fmt.Scanln(&deskChairPrice)
- fmt.Scanln(&umbrellaPrice)
- total := entrancePrice * float64(people) + deskChairPrice * math.Ceil(0.75 * float64(people)) + umbrellaPrice * math.Ceil(float64(people) / 2)
- fmt.Printf("%.2f lv.\n", total)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement