으하하 공부일기
[SWEA] - 2027. 대각선 출력하기 (D1) 본문
[문제]
주어진 텍스트를 그대로 출력하세요.
문제 풀기
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();
}
}
}
'SWEA > D1' 카테고리의 다른 글
[SWEA] - 2043. 서랍의 비밀번호 (D1) (0) | 2022.04.19 |
---|---|
[SWEA] - 2029. 몫과 나머지 출력하기 (D1) (0) | 2022.04.19 |
[SWEA] - 2025. N줄덧셈 (D1) (0) | 2022.04.19 |
[SWEA] - 1938. 아주 간단한 계산기 (D1) (0) | 2022.04.19 |
[SWEA] - 1933. 간단한 N 의 약수 (D1) (0) | 2022.04.19 |