learn-go-with-tests: github.com/quii/learn-go-with-tests/integers/v2 Index | Examples | Files

package integers

import "github.com/quii/learn-go-with-tests/integers/v2"

Index

Examples

Package Files

adder.go

func Add Uses

func Add(x, y int) int

Add takes two integers and returns the sum of them

Code:

sum := Add(1, 5)
fmt.Println(sum)

Output:

6

Updated 2018-10-22. Refresh now. Tools for package owners.