SWEA - [d1] 2027 대각선 출력하기

Esther·2022년 11월 19일
0

SWEA

목록 보기
12/46

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

package prc_d1;

public class P2027 {
	public static void main(String[] args) {
		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();

		}

	}

}

0개의 댓글