-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFOR TO STEP NEXT EXIT CONTINUE LOOPS
More file actions
44 lines (40 loc) · 1.11 KB
/
Copy pathFOR TO STEP NEXT EXIT CONTINUE LOOPS
File metadata and controls
44 lines (40 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Imports System
Module Program
Sub Main(args As String())
Dim A As Integer
Dim C As Integer
Dim R As Integer
C = Console.ReadLine()
For A = 0 To 10 'NORMAL LOOP
R = C * A
Console.WriteLine(R)
Next
Console.WriteLine("")
Console.WriteLine("")
Console.WriteLine("")
For A = 11 To 20 'NEXT CONTINUE THE LOOP YOU CANCHANGE ITS PARAMS
R = C * A
Console.WriteLine(R)
Next
Console.WriteLine("")
Console.WriteLine("")
Console.WriteLine("")
For A = 0 To 50 Step 5
R = C + A
Console.WriteLine(R)
If R = 50 Then
Exit For 'YOU CAN STOP THE LOOP WITH EXIT FOR
End If
Next
Console.WriteLine("")
Console.WriteLine("")
Console.WriteLine("")
For A = 0 To 20
R = C + A
If R = 10 Then
Continue For 'YOU CAN CONTINUE OVERPASSING THIS CONDITION
End If
Console.WriteLine(R)
Next
End Sub
End Module