Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
관리 메뉴

으하하 공부일기

[SWEA] - 2027. 대각선 출력하기 (D1) 본문

SWEA/D1

[SWEA] - 2027. 대각선 출력하기 (D1)

0으하하0 2022. 4. 19. 18:38

[문제]

주어진 텍스트를 그대로 출력하세요.

문제 풀기

2027. 대각선 출력하기

 


[풀이]

class Solution {
	public static void main(String[] args) throws Exception {		
		for(int i=0; i<5; i++) {
			for(int j=0; j<5; j++) {
				if(i==j) System.out.print("#");
				else System.out.print("+");
			}
			System.out.println();
		}
	}
}