마방진1 JAVA 문제풀이 10 마방진 Q. 5 * 5 마방진 package Day8; /* * Q 17. 5 * 5 마방진 */ public class Question1 { public static void main(String[] args) { // TODO Auto-generated method stub int arr[][] = new int[5][5]; int r = 0; int c = 2; for(int i=1; i4) { c = 0; } } for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr.length; j++) { System.out.printf("%d\t", arr[i][j]); } System.out.println(); } } } 나는 5의 배수 규칙으로 풀었으나,.. 2021. 4. 26. 이전 1 다음