Skip to content

Commit 77df3c8

Browse files
authored
Create 프로그래머스_서울에서김서방찾기.java
1 parent d573d7a commit 77df3c8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution {
2+
public String solution(String[] seoul) {
3+
String answer = "";
4+
int num = 0;
5+
for (int i = 0; i < seoul.length; i++) {
6+
if (seoul[i].equals("Kim")) {
7+
num = i;
8+
}
9+
}
10+
11+
return "김서방은 " + num + "에 있다";
12+
}
13+
}

0 commit comments

Comments
 (0)