dim i%,m%,n%,K%,min%,temp%
dim t() as integer
i=ubound(a)
m=ubound(b)
n=ubound(c)
temp=0
min=i
if min>m then min=m
if min>n then min=n
redim t(min)
for k=0 to min
t(k)=a(k)+b(k)+c(k)
if temp<t(k) then temp=t(k)
next
maxSum=temp
for k=0 to min
if t(k)=maxSum then
debug.print a(k),b(k),c(k)
exit for
end if
end function