Thursday, November 30, 2017

Product of Two Numbers in Go

Here is a simple program that I wrote using Go programming language that will ask the use to give two numbers and then our program will compute it's product.

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

product.go


// Product of Two Numbers in Go 
// Written By Mr. Jake R. Pomperada
// November 30, 2017

package main

import "fmt"

func main(){
    var a,b,product int

    fmt.Print("\n\n")
   fmt.Print("Product of Two Numbers")
    fmt.Print("\n\n")
    fmt.Print("Enter first value  : ")
    fmt.Scanln(&a)
    fmt.Print("Enter second value  : ")
    fmt.Scanln(&b)

    product = (a*b)
    
    fmt.Print("\n\n")
    fmt.Print("The product of " ,a , " and " , b , " is ", product, ".")
    fmt.Print("\n\n")
    fmt.Print("End of Program")
    fmt.Print("\n\n")
   
}

No comments:

Post a Comment