문제
구구단을 출력하는 문제입니다 이를 해결하는 프로그램의 다음 실행상태에 대해 빈칸을 채우세요
프로그램의 실행순서 및 실행상태
1 public static void main( String[] args ) {
2 for( int row = 1;
3 row <= 9;
5 for( int column = 1;
6 column <= 9;
8 System.out.printf(" %d * %d = %2d ", row, column, column * row );
1*1= 1
7 column++ ) {
6 column <= 9;
8 System.out.printf(" %d * %d = %2d ", row, column, column * row );
2*1= 2
7 column++ ) {
6 column <= 9;
8 System.out.printf(" %d * %d = %2d ", row, column, column * row );
3*1= 3
7 column++ ) {
6 column <= 9;
8 System.out.printf(" %d * %d = %2d ", row, column, column * row );
9*9=81
7 column++ ) {
6 column <= 9;
9 System.out.println();
4 row++ ) {
3 row <= 9;
10 }
프로그램 코드
public class Multiplication
{
1 public static void main( String[] args ) {
2 for( int row = 1;
3 row <= 9;
4 row++ ) {
5 for( int column = 1;
6 column <= 9;
7 column++ ) {
8 System.out.printf(" %d * %d = %2d ", row, column, column * row );
}
9 System.out.println();
}
10 }
}