java获取数组元素下标 写VB程序:利用一维数组求最大值及其下标?
写VB程序:利用一维数组求最大值及其下标?Dima(1to10)asinteger,iasinger,nasinger,maxainteger randomize forI=1to10 a(I)=in
写VB程序:利用一维数组求最大值及其下标?
Dima(1to10)asinteger,iasinger,nasinger,maxainteger randomize forI=1to10 a(I)=int(rnd()*100)“分配nexti max=a(1)n=1 forI=1to10 IFA(I)>maxthenmax=a(I)n=I ENDIF nexti print”最大值:“max”下标:“n