首页 > 代码库 > Demo10

Demo10

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];	
			}
		}
	}
}

  

Demo10