Skip to content

Commit 119ca53

Browse files
authored
Update and rename Printing First n natural numbers.py to Sum of First "n" Natural numbers.py
1 parent 8772e6d commit 119ca53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
n = int(input("Input n : "))
2+
sum = 0
23
for i in range(n):
3-
print(i+1)
4+
sum = sum + (i+1)
5+
print(sum)

0 commit comments

Comments
 (0)