Read a number n and print the sum 1 + 2 + ... + n. Use a while loop.
n
1 + 2 + ... + n
Input 5 gives 15. Input 0 gives 0.
5
15
0