World Languages, asked by nimrajamshaid52, 2 months ago

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 mehtasumit651
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