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 NUMBER ENTERED AND ITS REVERSED NUMBER

n=int(input("Enter the number = "))
k=n
q1=n//1000
n=n%1000
q2=n//100
n=n%100
q3=n//10
n=n%10
q4=n//1
n=n%1
p=q4*1000+q3*100+q2*10+q1
print("The reversed number =",q4*1000+q3*100+q2*10+q1)
print("The sum of number and the reversed number =",(k+p))