SAS OnlineTutorback||next

Try It! Construct a simple DO loop.

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.earn;
       Value=2000;
       do year=?
          Interest=value*.075;
          value+interest;
       ?
    run;
    proc print data=earn;
    run;
    
    
    Complete the DATA step by constructing a DO loop to compute the total value of Value earning 7.5% for 20 years.

  2. Submit the program.

  3. Note the value of year in the Output window.

    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