Friday, December 1, 2017

Positive and Negative Number Checker in Go

Here is a simple program that I wrote in Go to check if the given number by our user is positive or negative 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

negative.go


// Positive and Negative 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("Positive and Negative Number Checker in Go")
fmt.Print("\n\n")
    fmt.Print("Give a Number : ")
    fmt.Scanln(&a)
    fmt.Print("\n\n")
    if(a>=0){
        fmt.Println("The given number " ,a," is Positive number.")
    }else{
        fmt.Println("The given number " ,a, " is Negative number.")
    }
    fmt.Print("\n\n")
    fmt.Print("End of Program")
    fmt.Print("\n\n")
   
}






No comments:

Post a Comment