2 comments:

  1. a=int(raw_input("enter the number "))
    s=0
    t=a
    while a>0:
    s=s+a
    a=a-1
    print s

    ReplyDelete
  2. n=int(input('Enter a number'))
    s= 0
    while(n > 0):
    s=s+n
    n=n-1
    print s

    ReplyDelete