in python take a 4 digit number input from user.return the sum of each of the 4digits. only coding ,output is not required . anyone one help me
Answers
Answered by
0
Answer:
input n r s=O
n= 1034
print ( " input number =" n )
While ( n<0 )
r= n% 10
s= s+ r
n = n/10
print ( " sum =" s)
Similar questions