用c打印1-100的数,每打10个数换行继续打印

如题所述

第1个回答  2013-12-19
set talk off clear n=100 dime a(n) for i=1 to n a(i)=1+ int(rand()*100) endfor for i=1 to n-1 p=i for j=i+1 to n if a(p)>a(j) p=i endif endfor t=a(i) a(i)=a(p) a(p)=t endfor for i=1 to n ?? a(i) if i%10=0 ? endif endfor return
相似回答