mirror of
https://github.com/house-of-vanity/sum_counter.git
synced 2025-08-21 15:57:19 +00:00
9 lines
91 B
Python
9 lines
91 B
Python
num = 123
|
|
res = 0
|
|
|
|
while num > 0:
|
|
res = res + num % 10
|
|
num = int(num / 10)
|
|
|
|
print(res)
|