문제풀이/기타
SAS BASE Q8. do until & gt
나루다루
2018. 2. 12. 06:36
728x90
QUESTION NO: 8
The following SAS program is submitted:
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?
A. 6
B. 7
C. 8
D. (missing numeric)
Answer: B
# 문제 풀이
- do until (조건식); : 조건식이 참이 될 때까지 반복문 실행
- do while (조건식); : 조건문이 참일 동안에 반복문 실행(조건문이 참이면 실행)
- gt : greater than(>)
연산자 (둘 다 사용가능) | 기능 | 예시 | 예시결과 |
= (EQ) | 같다 | 3=2 | 0 |
^= (NE) | 같지 않다 | 3^=2 | 1 |
> (GT) | 크다 | 3>2 | 1 |
< (LT) | 작다 | 3<2 | 0 |
>= (GE) | 크거나 같다 | 3>=2 | 1 |
<= (LE) | 작거나 같다 | 3<=2 | 0 |
728x90
반응형