Sum of N natural Numbers


Submit solution

Points: 10 (partial)
Time limit: 15.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C

Given a positive integer N as input. Print the sum of natural numbers upto N. When N<0 zero should be printed.

Sample Input

5

Sample Output

15

Explanation

Sum of natural numbers from 1 to 5 i.e.;(1+2+3+4+5) is 15.


Comments

There are no comments at the moment.