data stats;
set revenue;
array weekly{5} mon tue wed thu fri;
total = weekly{i} * .25;
output;
end;
run;
Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?
A. do i = 1 to 5;
B. do weekly{i} = 1 to 5;
C. do i = mon tue wed thu fri;
D. A DO loop cannot be used because the variables referenced do not end in a digit.
9 comments:
Answer: A
A. do i = 1 to 5;
Answer A
Answer is A.
A
Do i=1 to 5
A
can some body explain why is it A instead of D
Aparna the answer is A and not D because if your variables are months of the year, or days of the week, which can be consecutive then you don't need digits at the end, SAS will know the days and months following each-other.
Post a Comment