package main
import ("fmt")
func argMax(arr [] int) int {
        maxVal:=arr[0]
        maxIndex:=0
        for i:=1;i<len(arr);i++{
                if maxVal<arr[i]{
                        maxVal=arr[i]
                        maxIndex=i
                }//if maxVal
        }//for i
        return maxIndex
}//argMax


func main() {
var q []int = []int{1,2,3}
fmt.Println(argMax(q))
}