14번

2023. 8. 26. 12:12javaFestival

package JavaFestival;

import java.util.Scanner;

public class jar14 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int [][] array = new int[N][N];
		
		for(int i=0; i<N;i++) {
			for(int j=0;j<N;j++) {
				array[i][j]= i + (j*5+1);
				System.out.println(array[i][j]+" ");
			}
			System.out.println();
		}
	}
}

'javaFestival' 카테고리의 다른 글

16번  (0) 2023.08.27
15번***  (0) 2023.08.27
13번  (0) 2023.08.26
12번*  (0) 2023.08.26
11번*  (0) 2023.08.26