Loop in sas

a)iterative

b) condition

c) iterative-conditional

Loop 1.1do j=1 to 10 by 1;
year+1;
cost=1.015*cost;
output;
end;
Loop 1.2do until(North_Carolina gt South_Carolina);
year+1;
North_Carolina=1.02*North_Carolina;
South_Carolina=1.01*South_Carolina;
output;
end;
Loop 1.3do while(North_Carolina le South_Carolina); 
year+1;
North_Carolina=1.02*North_Carolina;
South_Carolina=1.01*South_Carolina;
output;
end;
Loop 1.3do j=1 to 15 until(North_Carolina gt South_Carolina); 
year+1;
North_Carolina=1.016*North_Carolina;
South_Carolina=1.012*South_Carolina;
output;
end;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store