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]; |
} |
} |
} |
} |
初级程序员
by: 云代码会员 发表于:2016-10-15 20:43:09 顶(0) | 踩(0) 回复
初级
回复评论