операторы цикла в Visual basic

• View
2.701

2

• Category

Documents

Embed Size (px)

Text of операторы цикла в Visual basic

• 1. , . . - ., ,

2. : ( ); , , . 3. Visual Basic - For Next. For Next :For = To [Step ] [ ] [ExitFor] Next [] , ; ; ; , 1; Exit For For Next. 4. 5. 1 : Dim I As Integer For I = 1 To 10 Step 1 Print Visual Basic Next I End Sub 10 10 Visual Basic. 2 : Dim i As Integer Dim A As Integer A=3 For i=1 To 3 A=A*i Next i Print A 3 , 18 6. : (); (). 7. WHILE...WEND : While < > < > Wend 8. . . . . 10 ( ). .., . Dim N As Integer Dim K As Integer Dim M As Integer N = Val (Text1.Text) K=0 M=N Do While M 0 K=K+1 M = M/10 WEND Print " "; N, " "; K 0 9. DO...LOOP ).) Do While < > < > Loop ) Do Until < > < > Loop 10. Do Loop :) Do < > Loop While < > ) Do < > Loop Until < > . . 11. 4: A=1 Do A=A+1 Print Visual Basic Loop While A < 11 5: A=1 Do A=A+1 Print Visual Basic Loop Until A > 10 : A 11. Visual Basic , A (. . ). : A . , Visual Basic 10 . 12. 1. ? 2. ? 3. ?. ; . ; . ; . . 13. 1: : ! 15 For Next ( ). : ) 2. . ) For i=1 To 15 Step 2 For i=2 To 10 Step 1 ) For i=2 To 10 Step 1 For i=10 To 1 Step 1 . 14. 2: N . : ) , N. ) , N. 15. : 1, 2, , 20 \$ . ) ; ) .

Recommended

Documents
Technology
Education
Education
Documents
Documents
Documents
Education
Documents
Education
Documents
Education