Showing posts with label odd numbers in go. Show all posts
Showing posts with label odd numbers in go. Show all posts

Friday, December 1, 2017

Odd and Even Number Checker in Go

A very simple program that I wrote using Golang that will ask the user to give a number and then our program will check and determine if the given number is an Odd or Even number.

I am currently accepting programming work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.





Sample Program Output


Program Listing


odd_even.go


// Odd and Even Number Checker in Go 
// Written By Mr. Jake R. Pomperada
// December 1, 2017

package main

import "fmt"

func main(){
    var a int

fmt.Print("\n\n")
fmt.Print("Odd and Even Number Checker in Go")
fmt.Print("\n\n")
    fmt.Print("Give a Number : ")
    fmt.Scanln(&a)
    fmt.Print("\n\n")
    if(a%2==0){
        fmt.Println("The given number " ,a," is Even number.")
    }else{
        fmt.Println("The given number " ,a, " is Odd number.")
    }
    fmt.Print("\n\n")
    fmt.Print("End of Program")
    fmt.Print("\n\n")
   
}