2025-04-01 12:38:52 +02:00

13 lines
310 B
Python

from utils.memory_cell import MemoryCell
from utils.literal import Literal
x = MemoryCell(int(input("Erste Zahl: ")))
y = MemoryCell(int(input("Zweite Zahl: ")))
while x > Literal(0):
if x < y:
x, y = y, x
x -= y
print(y)
print(f"Insgesamt gab es {x.sub_count + y.sub_count} Subtraktionen.")