Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var hour int
- fmt.Scanln(&hour)
- var day string
- fmt.Scanln(&day)
- if (hour >= 10 && hour <= 18) {
- switch (day) {
- case "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday":
- fmt.Println("open")
- default:
- fmt.Println("closed")
- }
- } else {
- fmt.Println("closed")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement