2016-10-10|937阅|作者:云代码会员|举报 摘要:package asas;
public class jiujiuchengfabiao {
public static void main(String[] args) {
// TODO Auto-generated method stub
// 九九乘法表
int arr[
package asas;
public class jiujiuchengfabiao {
public static void main(String[] args) {
// TODO Auto-generated method stub
// 九九乘法表
int arr[][] = new int[9][9];
for (int i = 0; i < 9; i++) {
for (int j = 0; j <= i; j++) {
arr[i][j] = (i + 1) * (j + 1);
}
}
for (int i = 0; i < 9; i++) {
for (int j = 0; j <= i; j++) {
System.out.print((i + 1) + "x" + (j + 1) + "=" + arr[i][j] + "\t");
}
System.out.println();
}
int arr1[][] = new int[9][9];
int index[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
arr1[i][j] = index[j];
}
}
}
}