mirror of
https://github.com/house-of-vanity/sum_counter.git
synced 2025-08-21 15:57:19 +00:00
Free basic version
This commit is contained in:
8
new_sum.py
Normal file
8
new_sum.py
Normal file
@@ -0,0 +1,8 @@
|
||||
num = 123
|
||||
res = 0
|
||||
|
||||
while num > 0:
|
||||
res = res + num % 10
|
||||
num = int(num / 10)
|
||||
|
||||
print(res)
|
Reference in New Issue
Block a user