Advertisement
Spocoman

02. Weekend or Working Day

Sep 17th, 2024
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.35 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var day string
  6.     fmt.Scanln(&day)
  7.    
  8.     switch (day) {
  9.         case "Monday", "Tuesday", "Wednesday", "Thursday", "Friday":
  10.             fmt.Println("Working day")
  11.         case "Saturday", "Sunday":
  12.             fmt.Println("Weekend")
  13.         default:
  14.             fmt.Println("Error")
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement