public class NineToNine { public static void main(String[] args) { int mt[][] = new int[9][9]; //구구단 표 저장 배열 int i,j; <!--[if !supportEmptyParas]--> <!--[endif]--> //구구단 배열에 저장 for(i=0; i<9; i++){ for(j=0; j<9; j++) { mt[i][j] = (i+1) * (j+1); } } //구구단 표 출력 for(i=0; i<9; i++){ for(j=0; j<9; j++) { System.out.print((j+1) + "*" + (i+1) + "=" +mt[j][i] + "\t"); } System.out.println(); } } }
반응형
'프로그래밍' 카테고리의 다른 글
원의 면적 Class (0) | 2013.11.11 |
---|---|
배열_transpose (0) | 2013.11.11 |
달력프로그램 (0) | 2013.11.05 |
단순 연결 리스트(수정) (0) | 2013.11.05 |
희소행렬의 전치 연산 (0) | 2013.10.29 |