Skip to content

Commit a21de36

Browse files
committed
4번째 문제
1 parent 1d0c48a commit a21de36

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

bin/homework/Max.class

62 Bytes
Binary file not shown.

src/homework/Max.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public static void main(String[] args) {
1818
for (int i = 0; i < num.length; i++) {
1919
System.out.print((i + 1) + "번째 숫자 : ");
2020
num[i] = sc.nextInt();
21+
if(num[i]<0) {
22+
System.out.println("다시 입력해주세요!");
23+
i -= 1;
24+
}
2125
}
2226

2327
// 가장 큰수 구하기

0 commit comments

Comments
 (0)