Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var dancers int
- fmt.Scanln(&dancers)
- var points float64
- fmt.Scanln(&points)
- var season, destination string
- fmt.Scanln(&season)
- fmt.Scanln(&destination)
- totalSum := float64(dancers) * points
- if destination == "Abroad" {
- totalSum *= 1.50
- if season == "summer" {
- totalSum *= 0.90
- } else {
- totalSum *= 0.85
- }
- } else {
- if season == "summer" {
- totalSum *= 0.95
- } else {
- totalSum *= 0.92
- }
- }
- fmt.Printf("Charity - %.2f\n", totalSum * 0.75)
- fmt.Printf("Money per dancer - %.2f\n", totalSum * 0.25 / float64(dancers))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement