SAS OnlineTutorback||next

Try It! Construct a nested 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.save;
       Rate=.0625;
       do y=1 to 20;
          Amount+2000;
          amount+amount*rate;
       end;
    run;
    
    
    Revise the DATA step to calculate the interest four times annually and to increase Amount by 2000 annually.

  2. Submit the program and correct any errors.

  3. Print the data set and view the output. The data set should contain 1 observation and 4 variables.

    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