
#A=Array[3,6,1,17,-22,11,20,5,6]
A = Array.new

A << 80
A << 75
A << 32
A << 101

def max 
  bigindex=0
  A.length.times{|i| 
      if (A[i]>A[bigindex]) 
         bigindex=i
      end
  }
return bigindex
end

print("The max index is #{max} of value #{A[max]}\n")

