Last active
December 2, 2016 02:16
-
-
Save andresmachado/8e3ee200c45f3fcd3a5d20f18799f803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = input("Digite um número inteiro: ") | |
total = 0 | |
i = 0 | |
while i < len(num): | |
total += int(num[i]) | |
i += 1 | |
print(total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment