Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
17
Task/Loops-Nested/Julia/loops-nested.julia
Normal file
17
Task/Loops-Nested/Julia/loops-nested.julia
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
M = [rand(1:20) for i in 1:5, j in 1:10]
|
||||
R, C = size(M)
|
||||
|
||||
println("The full matrix is:")
|
||||
println(M, "\n")
|
||||
|
||||
println("Find the first 20:")
|
||||
for i in 1:R, j in 1:C
|
||||
n = M[i,j]
|
||||
@printf "%4d" n
|
||||
if n == 20
|
||||
println()
|
||||
break
|
||||
elseif j == C
|
||||
println()
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue