In your code, i
takes values from 0, 1, 2, 3 and 4 & j
takes values as:
i Value j Values
0 0, 1, 2, 3, 4
1 1, 2, 3, 4
2 2, 3, 4
3 3, 4
4 4
Now, add up all the values that j
takes and see what the sum is!
solved Sum the values of a nested for loops