Advertisement
Spocoman

02. Summer Outfit

Sep 18th, 2024
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.80 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var gradus int
  6.     fmt.Scanln(&gradus)
  7.    
  8.     var time string
  9.     fmt.Scanln(&time)
  10.      
  11.     var outfit = "Shirt"
  12.     var shoes = "Moccasins"
  13.  
  14.     if (time == "Morning") {
  15.         if (gradus >= 10 && gradus <= 18) {
  16.             outfit = "Sweatshirt"
  17.             shoes = "Sneakers"
  18.             } else if (gradus > 24) {
  19.                 outfit = "T-Shirt"
  20.                 shoes = "Sandals"
  21.             }
  22.     } else if (time == "Afternoon") {
  23.         if (gradus > 18 && gradus <= 24) {
  24.             outfit = "T-Shirt"
  25.             shoes = "Sandals"
  26.         } else if (gradus > 24) {
  27.             outfit = "Swim Suit"
  28.             shoes = "Barefoot"
  29.         }
  30.     }
  31.  
  32.     fmt.Printf("It's %d degrees, get your %s and %s.", gradus, outfit, shoes);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement