SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Generating Data with DO Loops
Constructing DO Loops


Question:
Complete the DATA step below by constructing an iterative DO loop that computes the interest for one year on an account that is compounded quarterly. Use qtr as the index variable.
data work.compq;
   Amount=5000;
   Rate=.0625;
   
      Earned+(amount+earned)*(rate/4);
   end;
run;

           


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement