24 lines
616 B
Plaintext
24 lines
616 B
Plaintext
#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
|