蓝魔i7s卡刷:二维数组排序赋值问题

来源:百度文库 编辑:高考问答 时间:2024/05/01 01:52:33
Dim a
myArray = (1,4,5)
omyArray = (111,222,333)
想返回的结果是
a(1) = 111
a(4) = 222
a(5) = 333

dim a as string()
dim MaxInt as int
for i as integer =0 to myArray.lenth-1
'调用方法找出最大的值
MaxInt='最大的值
next
redim a(MaxInt)
for j as intfer =0 to a.lenth-1
for k as integer 0 to myArray.lenth -1
if j = myArray(k) then
a(i)=omyArray(i)
end if
next
next