java/코드 리뷰

4. control - (2) Gugudan2 (구구단 출력)

Astaroth아스 2020. 3. 20. 12:03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package control;
 
public class Gugudan2 {
    public static void main(String[] args) {
        
        int dan = 0;
        
        for (int i=1; i<=9; i++) {
            for(int j=2; j<=9; j++) {
                dan = i * j;
                System.out.print(j + " * " + i + " = " + dan);
                System.out.print("\t");
            }
            System.out.println();
        }
        
    }
}