Advertisement
Spocoman

03. Even or Odd

Sep 16th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.19 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var num int
  6.     fmt.Scanln(&num)
  7.  
  8.     if (num % 2 == 0) {
  9.         fmt.Println("even")
  10.     } else {
  11.         fmt.Println("odd")
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement