Translate To Preferred Language

Search ObiokusThoughts (Posts Only)

Please Read Today's Featured Post

The Inherent Rationale Of Perception

Perception is one of the most important factors affecting our day to day lives as human beings.  I believe it is one of the most underrate...

Donate

Use the button below to make one time or recurring donations to help generate income. Thank you very much for your generosity. Please continue to enjoy ObiokusThoughts.com


HelloWorld Example in Go (some bugs may occur)

package main

import "fmt"
import "time"

func main() {
var name string = "Obioku Obotette"

fmt.Println("Name is", name)

fmt.Println("Address of name is", &name)

fmt.Println("It is", time.Now())

add, subtract, multiply, divide := math(6, 8)

fmt.Println("Results for math function are", add, subtract, multiply, divide)

var slice []int

slice = make([]int, 1, 2)

fmt.Println("Dimensions of slice are", len(slice), cap(slice), slice)
}

func math(o1, o2 int) (int, int, int, int) {
var a int = o1 + o2
var b int = o1 - o2
var c int = o1 * o2
var d int = o1 / o2

return a, b, c, d
}

No comments:

Post a Comment

Thank you very much for viewing this entry and I hope you are able to return soon to continue to enjoy more of the site.
Please share your thoughts in the comment section.
Be blessed and enjoy life!