Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Add two numbers in Go

Numbers can be declared and assigned with := operator. To perform addition + operand can be used on integers and the result can be stored in result variable.

Example : Addition of two numbers
package main

import "fmt"

func main() {

    num1 := 3

    num2 := 5

    result := num1 + num2

    fmt.Printf("Addition of two numbers result %d", result)

}



Output
8