1 2 3 4 5 6 7 8 9
arraySum(array) sum=0 for i=0 to array.length-1 do if i%2==0 then sum=sum+array[i][2]+array[i][3] else sum=sum+array[i][0]+array[i][5] return sum
You can clone a snippet to your computer for local editing. Learn more.