Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Loops-Nested/Maxima/loops-nested.maxima
Normal file
15
Task/Loops-Nested/Maxima/loops-nested.maxima
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
data: apply(matrix, makelist(makelist(random(100), 20), 20))$
|
||||
|
||||
find_value(a, x) := block(
|
||||
[p, q],
|
||||
[p, q]: matrix_size(a),
|
||||
catch(
|
||||
for i thru p do
|
||||
for j thru q do
|
||||
if a[i, j] = x then throw([i, j]),
|
||||
'not\ found
|
||||
)
|
||||
)$
|
||||
|
||||
find_value(data, 100);
|
||||
not found
|
||||
Loading…
Add table
Add a link
Reference in a new issue