The following SAS program is submitted:
data work.pieces;
do while (n lt 6);
n + 1;
end;
run;
do while (n lt 6);
n + 1;
end;
run;
Which one of the following is the value of the variable N in the output data set?
A. 4
B. 5
C. 6
D. 7
A. 4
B. 5
C. 6
D. 7
3 comments:
Answer : C
When n=6 the do while stops
but do while N less than 6. I think it has to be 5;
@ shaidacious: Yes N less than 6 = 5. But because of n+1 it becomes 6 (=5+1)
Post a Comment