Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 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