Computer Science, asked by ritikg8288, 9 months ago

Programs class +1 python numerics to find the sum of natural numbera

Answers

Answered by karanjotgaidu
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