Programs class +1 python numerics to find the sum of natural numbera
Answers
Answered by
1
Answer:
N=int(input('Enter no.of natural numbers'))
K=1
Sum=0
while K < N :
S+=K
K+=1
print("SUM=", Sum)
..................................................................
For eg: you input 5
Output will be,
SUM=15
ie 1+2+3+4+5=15
Hope it helps....
Follow me
Similar questions
English,
5 months ago
Computer Science,
5 months ago
Hindi,
5 months ago
Hindi,
10 months ago
Biology,
1 year ago