标签:main math random rand demo out java rgs dom
public class Demo10 { public static void main(String args[]){ int a[][] = new int[10][10], max = 10; for(int i = 0;i < 6;++i){ for(int j = 0;j < 6;){ while(5 > 1){ int m = (int)(Math.random()*100); if(10 <= m && m <= 30){ a[i][j++] = m; if(m > max)max = m; break; } } } } System.out.println(max); int b[][] = new int[10][10]; for(int i = 0;i < 6;++i){ for(int j = 0;j < 6;++j){ b[i][j] = a[j][i]; } } } }
标签:main math random rand demo out java rgs dom
原文地址:http://www.cnblogs.com/cwenliu/p/5984588.html