The following SAS program is submittad:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?
The following SAS program is submittad:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?
The SAS program uses two nested DO loops where the outer loop iterates from year 1 to 5 and the inner loop iterates from month 1 to 12. For each iteration of the inner loop, the value of x is incremented and an OUTPUT statement writes an observation to the data set. The outer loop runs 5 times and for each run of the outer loop, the inner loop runs 12 times, resulting in a total of 5 * 12 = 60 observations being written to the WORK.SALES data set.
Answer A is correct for given program. Not D. Output is not a statement semicolon is missing.
there is a missing semicolon after the output statement, .. which could lead to answer A. Otherwise, if we assume that the semicolon is there, then answer D is correct.
i think the answer for this is 0 because they only asked about the number of observations