Download presentation

Presentation is loading. Please wait.

Published byNathan McNeil Modified over 3 years ago

2
LOOPS Loops are lines of code that can be run more than one time. Each time is called an iteration and in for loops there is also an index that is changing each iteration (the index is actually a local). forvalues i = 1(1)6 { display "Iteration #`i'" } Will print: Iteration #1 Iteration #2 Iteration #3

3
LOOPS forvalues i = 1(1)6 { display "Iteration #`i'" } This goes from { to } The first time i =1, then 2, then 3. It stops when it has reached 6.

4
LOOPS forvalues i = 5(2)16 { display "Iteration #`i'" } Will print: Iteration #5 Iteration #7 Iteration #9 Iteration #11 Iteration #13 Iteration #15

5
LOOPS forvalues i = 5(2)16 { display "Iteration #`i'" } That is, the increase is by 2 each time through the loop starting at 5.

Similar presentations

OK

C1 Sequences and series. Write down the first 4 terms of the sequence u n+1 =u n +6, u 1 =6 6, 12, 18, 24.

C1 Sequences and series. Write down the first 4 terms of the sequence u n+1 =u n +6, u 1 =6 6, 12, 18, 24.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Download ppt on turbo-generator integrated gas energy recovery system Ppt on bluetooth applications for pc Ppt on conservation of environmental degradation Ppt on articles of association 1774 Ppt on paris in french Ppt on origin of english language Ppt on obesity prevention in schools Ppt on indian textile industries in nigeria Ppt on global warming and greenhouse effect Ppt on corporate personality development