GO Program to Check Whether a Number is Even or Odd

In this program, if..else... conditional statement is used to check weather a number entered by user is Even or Odd.


// Simple Program to Check Entered Number is Even or Odd

package main

import "fmt"

func main(){
    fmt.Print("Enter number : ")
    var n int
    /*  Conditional Statement if .... else ........     */
        fmt.Println(n,"is Even number")
        fmt.Println(n,"is Odd number")
Most Helpful This Week