Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
v4
/
vlib
/
v2_toberemoved
/
gen
/
arm64
/
tests
/
array_pop_value.v
13
lines
·
13
sloc
·
223 bytes
·
c0624b274a458fe3e487d89ae9554c2e8c25bdb6
Raw
1
fn
main() {
2
mut
matrix := [][]int{len: 4}
3
mut
worklist := []int{}
4
worklist << 2
5
idx := worklist.pop()
6
matrix[idx] << 10
7
matrix[idx] << 5
8
mut
total := 0
9
for
value
in
matrix[2] {
10
total += value
11
}
12
println(total)
13
}
14