The workshop collects one contribution on day 1, two on day 2, and so on through day 5. Add those daily counts to a running total.
The starter initializes total to zero and prints it after the marked area. Run it once before editing: Collected: 0 is the unfinished baseline.
for loop that visits days 1 through 5 and adds each day's number to the supplied total.Edit main.c, then Run and Submit. The supplied print should show Collected: 15. Keep it after the loop so it prints only the final result.
Trace the partial totals: 1, 3, 6, 10, 15. If you get 10, check whether day 5 is excluded. If you get 5, check whether you replaced the total on each pass rather than adding to its previous value. total += day; is shorthand for total = total + day;.
The check sees the final total, not the loop. Do not replace the calculation with a literal answer.
Start day at 1, continue while day <= 5, and add day to total in the body.