Philip Harris

Philip Harris

  • NA
  • 45
  • 7.5k

Doing homework and I'm stuck (Fragments)

Jan 14 2015 8:40 PM
I am having trouble interpreting how to write this fragment?
sum<--0
for i from 1 to n
   sum <-- sum -1
   for j from 1 to i 
   sum <-- sum + 2 

Answers (2)