Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var budget float64
- fmt.Scanln(&budget)
- var season string
- fmt.Scanln(&season)
- var place = ""
- var region = ""
- switch (season) {
- case "summer":
- place = "Camp";
- if (budget <= 100) {
- budget *= 0.3
- } else if (budget > 100 && budget <= 1000) {
- budget *= 0.4
- }
- case "winter":
- place = "Hotel"
- if (budget <= 100) {
- budget *= 0.7
- } else if (budget > 100 && budget <= 1000) {
- budget *= 0.8
- }
- }
- if (budget <= 100) {
- region = "Bulgaria"
- } else if (budget > 100 && budget <= 1000) {
- region = "Balkans"
- } else {
- place = "Hotel"
- region = "Europe"
- budget *= 0.9
- }
- fmt.Printf("Somewhere in %s\n%s - %.2f\n", region, place, budget)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement