日期:2014-05-18 浏览次数:20771 次
public class BasicStatistics {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[][] numTable = new int[3][5];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 5; j++) {
numTable[i][j] = Integer.parseInt(args[i*numTable.length+j]);
}
}
for (int m = 0; m < numTable.length; m++) {
for (int n = 0; n < numTable[m].length; n++) {
System.out.print(numTable[m][n]+" ");
}
}
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int[][] numTable = new int[3][5];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 5; j++) {
int k=i*numTable[0].length + j;
System.out.println(k);
numTable[i][j] = Integer
.parseInt(args[k]);
}
}
for (int m = 0; m < numTable.length; m++) {
for (int n = 0; n < numTable[m].length; n++) {
System.out.print(numTable[m][n] + " ");
}
}
}