关于随机产生20个两位正整数,确定其中最大数的位置。谁能写出代码来?的问题
for i = 0 to 19
a(i) = rnd()
next i
for i = 0 to 18
if (a(i) > a(i + 1)) then
maxa = a(i)
max = i
else
maxa = a(i + 1)
max = i + 1
end if
next i
关于随机产生20个两位正整数,确定其中最大数的位置。谁能写出代码来?的问题
for i = 0 to 19
a(i) = rnd()
next i
for i = 0 to 18
if (a(i) > a(i + 1)) then
maxa = a(i)
max = i
else
maxa = a(i + 1)
max = i + 1
end if
next i