top of page

Sum of Natural Numbers

Subham Das

Sum of the 'n th' natural number using programming language. This program will print the series with the sum of the natural number. The series is:

1,2,3,4,5,6,7,8, ...................



# Program to print the series and the sum.

# Here enter number up to which the natural will print.

n = int(input("Enter number:"))

sum = 0

for i in range (1,n+1) :

sum += i

print(i, end=',')

print("Sum of the numbers :",sum)




3 views0 comments

Recent Posts

See All

Mathematical Series

There so many mathematical series. One of the series is given below. And we use different programming language to print the sum or the...

Commentaires


logo12.PNG

Join my mailing list

2019 established by trueprogrammer

bottom of page