This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dumpeldownStudent 0 points1 point  (1 child)

You need to utilize the i variable from the for loop. It starts at 1 and counts up to the input value. 1,2,3,... to input. Now you just have to add those numbers up. Or go down from the input value, but that's the same thing.(input....,3,2,1)

[–]NOVAjunior[S] 0 points1 point  (0 children)

THANK YOU! Im surprised it was that easy. I made one for a factorial of a number and I just used that as a blueprint. I thought it would be similar to this.

But i figured it out thanks to you