SAS OnlineTutorback||next

Try It! Execute a DO loop until a condition is true.

Creating HTML output? Read this first.

  1. Copy the program below and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).
    data work.retire;
       Savings=?
       Income=?
       do ?
          Year+1;
          income+income*.04;
          savings+income*.10;
       end;
    run;
    
    Complete the DATA step by including a DO UNTIL statement to determine the number of years until Savings reaches $1,000,000. Be sure to enter initial amounts for Income and Savings.

  2. Submit the DATA step and correct any errors; then print the data set.

    Return here and select Next.

Solution

back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA.
All rights reserved.

Terms of Use & Legal Information | Privacy Statement