공부기록/SWEA
[SWEA] 2027번 대각선 출력하기
메델
2023. 10. 21. 19:34
import java.util.Scanner;
public class Solution {
public static void main(String[] args){
Scanner kb = new Scanner(System.in);
char[][] arr = new char[5][5];
for(int i=0; i<5; i++) {
for(int j=0; j<5; j++) {
if(i==j) {
arr[i][j] = '#';
System.out.print(arr[i][j]);
}else {
arr[i][j]= '+';
System.out.print(arr[i][j]);
}
}
System.out.println();
}
}
}