Quick actions

cmd+k|ctrl+k

Navigation

Languages

LoopsAndArraysKJul

Snippet info

Language

Julia

Visibility

public

Author

chaimspear-glot-julia

Created

2025-08-14T14:22:07.897623Z

Updated

2025-08-14T14:25:14.464473Z

println("Hello world!")

col = [10 2;
       3 20;
       30 4;
       40 55]
       
colPlus2 = col .+  [2]  
colPlus25 = col .+  [2 5]       
println(colPlus2)     
println(colPlus25)

println(colPlus25[1,1])  # first row, first column → 10
println(colPlus25[4,2])  # fourth row, second column → 55

for i in 1:size(colPlus25, 1)
    println("Row $i: ", colPlus25[i, :])
    for j in 1:size(colPlus25, 2)
        println("colPlus25[$i,$j] = ", colPlus25[i,j])
        println("string inter: colPlus25[$i,$j] = $(colPlus25[i,j])")
    end
end
INFO