Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

MY PROGRAMMES

Sunday, April 9, 2023

THE SUM OF DIGITS OF NUMBER ENTERED

n=int(input("Enter the number = "))
q1=n//1000
n=n%1000
q2=n//100
n=n%100
q3=n//10
n=n%10
q4=n/1
n=n%1
print("The sum of digits of number enetered =",q1+q2+q3+q4)