Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var agency string
- fmt.Scanln(&agency)
- var tickets, kidTickets int
- fmt.Scanln(&tickets)
- fmt.Scanln(&kidTickets)
- var ticketPrice, service float64
- fmt.Scanln(&ticketPrice)
- fmt.Scanln(&service)
- totalAdultTicketPrice := (ticketPrice + service) * float64(tickets)
- totalKidTicketPrice := (0.3 * ticketPrice + service) * float64(kidTickets)
- profit := (totalAdultTicketPrice + totalKidTicketPrice) / 5
- fmt.Printf("The profit of your agency from %s tickets is %.2f lv.", agency, profit)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement