I have a question on how to program my nested loops. This is the output i am supposed to have.
Enter the number you want to sum to: 8
0 = 0
0 + 1 = 1
0 + 1 + 2 = 3
0 + 1 + 2 + 3 = 6
0 + 1 + 2 + 3 + 4 = 10
0 + 1 + 2 + 3 + 4 + 5 = 15
0 + 1 + 2 + 3 + 4 + 5 + 6 = 21
0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28
0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36
I understand enough to get the last line where just the number 8 if summed. However i am having a real hard time thinking of how to do the loop to get the previous ones. Any help is really appreciated. btw I looked through the code snippets and didnt find any help there.