Computer Science, asked by sanchitatarafdar30, 10 months ago

wap to accept a 3 digit number and calculate and sum of each digit​

Answers

Answered by Anonymous
1

Answer:

hi... its a python program..

Explanation:

n=int(input("enter a number"))

sum=0

num=n

while num!=0:

   rem=num%10

   num=num//10

   sum+=rem

print(sum)

#hope it helps you

please mark brainliest

Similar questions