2 comments:

  1. a=int(raw_input("number is "))
    s=0
    while a>0:
    r=a%10
    s=s+r
    a=a/10
    print s
    number is 123
    6

    ReplyDelete
  2. a=int(raw_input('enter the number'))
    s=0
    c=0
    while a>0:
    c=a/10
    s=s+c
    a=a/10
    print s

    ReplyDelete