길이가 n인 정사각형 출력
예)
1 2 3 4
2 4 6 8
4 8 12 16
8 16 24 32
package _2;
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] squre = new int[n][n];
for(int i=0 ;i<n ;i++)
{
int count = 1+i;
for(int j=0; j<n ; j++)
{
squre[i][j] = (i+1) * (j+1);
System.out.print(squre[i][j]+" ");
}
System.out.println();
}
}
}