스크립트(while)중에...

by 바람돌이의전설 posted Mar 13, 2007
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

ESC閉じる

Larger Font Smaller Font 上へ 下へ Go comment 印刷

while문에서

a = 0              
i = 1              

while i <= 5       


  a += i            <===이곳


  i += 1            <===이곳


end                
p a                


 


출력하게 되면


0,1


1,2


3,3


6,4


10,5


이렇게 출력되잖아요


 


 


a = 0              
i = 1              

while i <= 5       


   i += 1         <===이곳   


  a += i          <===이곳  


end                
p a 


 


바뀌게 되면


0,1


2,2


5,3


9,4


13,5


이렇게 출력될수도 있나요?


Articles

1 2 3 4 5 6 7 8 9 10