정보처리기사 2021년 2회 70번
IT 위키
과목: 프로그래밍 언어 활용
1 문제[편집 | 원본 편집]
70. 다음 JAVA 프로그램이 실행되었을 때의 결과는?
public class arrayl {
public static void main(String[] args) {
int cnt = 0;
do {
cnt++;
} while(cnt < 0);
if(cnt==1)
cnt++;
else
cnt=cnt+3;
System.out.printf("%d", cnt);
}
}
- ① 2
- ② 3
- ③ 4
- ④ 5
2 풀어보기[편집 | 원본 편집]
3 정답[편집 | 원본 편집]
- 1번