Skip to content

Instantly share code, notes, and snippets.

@t32k
Created March 14, 2016 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t32k/e813cb46eaa9672884f6 to your computer and use it in GitHub Desktop.
Save t32k/e813cb46eaa9672884f6 to your computer and use it in GitHub Desktop.
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