write a program to prints the sum of digits of a given number

 write a program to prints the sum of digits of a given number .


    x=input()

    s=0

    for i in str(x):

        s+=int(i)

    print(s)

Comments