Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- invoer1 = int(input())
- invoer2 = int(input())
- spatie = " "
- print(f"{spatie}{invoer1} {invoer2}")
- while invoer1 != -1 and invoer2 != -1:
- tijdelijk = []
- for x in list(str(invoer1)):
- tijdelijk.append(x)
- for x in list(str(invoer2)):
- tijdelijk.append(x)
- som = 0
- for x in tijdelijk:
- som += int(x)
- invoer1 = som
- reserve = invoer2
- invoer2 = int(input())
- spatie += " "
- if invoer2 == -1:
- print(f"{spatie}{invoer1}")
- else:
- print(spatie+str(invoer1).center(4)+str(invoer2).center(4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement