java獲取數(shù)組元素下標(biāo) 寫VB程序:利用一維數(shù)組求最大值及其下標(biāo)?
寫VB程序:利用一維數(shù)組求最大值及其下標(biāo)?Dima(1to10)asinteger,iasinger,nasinger,maxainteger randomize forI=1to10 a(I)=in
寫VB程序:利用一維數(shù)組求最大值及其下標(biāo)?
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”下標(biāo):“n