To add first n natural numbers
Submit solution
C
Points:
10
Time limit:
10.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
To add first n natural numbers
Sample input
5
Sample output
15
Sample input
0
Sample output
0
Sample input
-9
Sample output
0
Comments