Hello,
I have an array of numbers where I am attempting to extract the highest (max) number in the array. I am pretty new to asp and vbscript and hope to get some help. My code below returns 22 as the max number though it should be 45. can someone direct me in the right direction?
Thanks
MyArray=Array(25,14,20,45,25,4,1,31,22,7)
For i=0 to ubound(MyArray)
For j=i+1 to ubound(MyArray)
if myarray(i) > MyArray(j) then
co = myarray(i)
end if
next
next
'Write the Highest number in MyArray
Response.write co