- Copy the program below and paste it into the Program Editor window (or issue the command
copy sashelp.oltutor..source ).
data work.retire;
Savings=8000;
Income=42000;
do until(savings>=1000000);
Year+1;
income+(income*.04);
savings+(income*.10);
end;
run;
proc print data=work.retire;
run;
Submit the DATA step. Note the Savings value.
-
Recall the program and change the DO UNTIL statement to a DO WHILE statement
to calculate the years required to reach $1,000,000.
-
Submit the program again and compare the results of
Savings
to the value of the first program. The value should be the same for both
programs.
Return here and select Next.
|