Skip to content

Instantly share code, notes, and snippets.

@t32k t32k/max.go
Created Mar 14, 2016

Embed
What would you like to do?
package main
import "fmt"
func main() {
array := []int{5, 14, 100, 1, 2, 3}
max := array[0]
for i := 0; i < len(array); i++ {
if max < array[i] {
max = array[i]
}
}
fmt.Print(max)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.