Files
  • main.go
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main

import "fmt"

func isEvenOdd(x int) string {

	if (x & 1 == 0) {
	return "even"
	
	} else {
	return "odd"
	}
}


func main() { 
	
	var i int
	fmt.Println("Enter an Integer")
	fmt.Scanf("%d", &i)
	fmt.Println(isEvenOdd(i))
}
go version go1.9.4 linux/amd64