??????? ????

 
 

8. ?''
8.1. ?? '? ?'????? '???'?.
8.2. ???'?? ?+?''.
8.2. ????'??''??'? ????'.

? ????%?? ?'?? ??????????' ?'??'?? ???'????%:?? ??? ?????. ?????', ??'??' ???'????'??, ?'??'?? ''?? ?'. ?' '?+?'?? ?'??'?'? ???'?? ?? ????? ?? ??'?? ?'? ?, '? ???'??'?? ???'?? ?' ?? ?''???.

?' ?? ?''???

For ?''?=?-? To ???-? [Step ??]
?'? ?'
Next [?''?]

(??'? ? ????'?' ???+? ??' ?'??'?'???'?)

-??? ?''? (???'? ?') - ?'? ?????? '??? '?. ? (Step) - ?'? ?'?, ? ??'???? ??'?'?? ?''? ???' ?????? ???'??? ????? ?' ?'. ?' ? ? ???'?? ?'??'?'??', '? ?? ?? ???'?? ??? 1. ??'?'? ???'? ???' Next ? ?+?''???. ?? ??+:??? ? ?'? ?'???': ?'??. ???? ?''? ???'??' ??????? -???, ?'? ?' +??' ?'??'??? ???'??? ?.

????. ??' ????? ???': 100 ?'??'??': ?'.

Dim S, I As Integer
For
I = 1 To 100
S = S + I
Next I

????. ??' ????? ???': 100 ''?': ?'??'??': ?'.

Dim S, I As Integer
For
I = 2 To 100 Step 2
S = S + I
Next

?' ? ?????'??? ?????' ?'??'?? ???'???? ?? ': ???, ??? ?????'?? ???-'? ??'??. ???? '? ?' ?????'?? '???, ???? ??'?'?? ???'???? ?? ???'??, ??'?? '?'??? ??'?? ?'??'??? ?' ?'.

While ??'??
?'? ?'
End While

?' ? ???'??'??? ?????' ?'??'?? ???'???? ?? ': ???, ??? ? +??' ?'??'??? ???-'? ??'??. ???? '? ?' ?????'?? '???, ???? ??'?'?? ???'???? ?? ???'??, ??'?? '?'??? ??'?? ?':?? ?' (????? ???'????).

Do Until ??'??
?'? ?'
Loop

???'? ? Visual Basic 2005:
???'??? ?+?' '- 15. ????. ('?'?? ??'?'???)
???'??? ?+?' '- 16. '?'? '???. ('?'?? ??'?'???)

???'? ? Visual Basic 2008:
???'??? ?+?' '- 15. ????. ('?'?? ??'?'???)
???'??? ?+?' '- 16. '?'? '???. ('?'?? ??'?'???)

-??.

???'? ????' "'?'? '????" ?'? ???'???? ??'??? ??' ??': '????. ?'???'? ?? ????? ????'???.

?? ??:??'? ? ???? ?+?? ???. ''?''? ?:? ??? ????' ??????''? ? ???????.

 

 


?? ???'???? ?'?'?? ??' ?????+ ??+'??'? ??'?
''?????? ?.?. ?.'., 2009-2011

?'??@Mail.ru     

Hosted by uCoz