September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
25
Task/Loops-Nested/Gambas/loops-nested.gambas
Normal file
25
Task/Loops-Nested/Gambas/loops-nested.gambas
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Public Sub Main()
|
||||
Dim siArray As New Short[5, 5]
|
||||
Dim siCount0, siCount1 As Short
|
||||
Dim bBreak As Boolean
|
||||
|
||||
For siCount0 = 0 To 4
|
||||
For siCount1 = 0 To 4
|
||||
siArray[siCount0, siCount1] = Rand(1, 20)
|
||||
siArray[siCount0, siCount1] = Rand(1, 20)
|
||||
Next
|
||||
Next
|
||||
|
||||
For siCount0 = 0 To 4
|
||||
For siCount1 = 0 To 4
|
||||
If siArray[siCount0, siCount1] = 20 Then
|
||||
bBreak = True
|
||||
Break
|
||||
Endif
|
||||
Next
|
||||
If bBreak Then Break
|
||||
Next
|
||||
|
||||
Print "Row " & Str(siCount0) & " column " & Str(siCount1) & " = 20"
|
||||
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue