2
Answers

Doing homework and I'm stuck (Fragments)

Photo of Philip Harris

Philip Harris

10y
1.3k
1
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)