Sum of N Natural Numbers


Submit solution

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

Author:
Problem type
Allowed languages
C

Problem Statement

Given a positive integer N as input, print the sum of Natural Numbers upto N. Whwn N is less than or equal to Zero, 0 should be printed.

Sample Input

5

Sample Output

15

Explanation

Sum of Natural Numbers from 1 to 5 is 15.


Comments

There are no comments at the moment.