Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var gradus int
- fmt.Scanln(&gradus)
- var time string
- fmt.Scanln(&time)
- var outfit = "Shirt"
- var shoes = "Moccasins"
- if (time == "Morning") {
- if (gradus >= 10 && gradus <= 18) {
- outfit = "Sweatshirt"
- shoes = "Sneakers"
- } else if (gradus > 24) {
- outfit = "T-Shirt"
- shoes = "Sandals"
- }
- } else if (time == "Afternoon") {
- if (gradus > 18 && gradus <= 24) {
- outfit = "T-Shirt"
- shoes = "Sandals"
- } else if (gradus > 24) {
- outfit = "Swim Suit"
- shoes = "Barefoot"
- }
- }
- fmt.Printf("It's %d degrees, get your %s and %s.", gradus, outfit, shoes);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement