Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
23
Task/Loops-Nested/Amazing-Hopper/loops-nested.hopper
Normal file
23
Task/Loops-Nested/Amazing-Hopper/loops-nested.hopper
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <jambo.h>
|
||||
|
||||
#define DIMS 10
|
||||
Main
|
||||
Unset decimal
|
||||
Dim (DIMS,DIMS) as ceil rand (20,t)
|
||||
|
||||
Set decimal '0'
|
||||
Printnl ("ORIGINAL MATRIX:\n", Just right (3, Str(t)), "\n")
|
||||
|
||||
aux=0
|
||||
Loop for ( i=1, #(i<=DIMS && aux<>20 ), ++i)
|
||||
Loop for ( j=1, #(j<=DIMS), ++j)
|
||||
When ( Equals ( 20, [i,j] Get 't' ---Copy to 'aux'---) ) { Break }
|
||||
/*
|
||||
Also: When( #( ((aux:= (t[i,j])) == 20) ) ) { Break }
|
||||
*/
|
||||
Just right (3, Str(aux)), Print only if ( #(DIMS-j), "," )
|
||||
Next
|
||||
Prnl
|
||||
Next
|
||||
Printnl ("\nFOUNDED: ", i,",",j," = ",aux)
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue