Practice · 1 of 4
Sum to N
CHALLENGE
Difficulty: beginner+25 XP
Implement int sum_to(int n) returning 1+2+...+n using a loop (not the closed formula).
Press Submit to check your solution.
Back to lesson: Practice: Loop Gym
Practice · 1 of 4
Implement int sum_to(int n) returning 1+2+...+n using a loop (not the closed formula).
Back to lesson: Practice: Loop Gym