Oliver Hofmann 78d4b25bd4 Renamed directories to use them as modules
Literal: Allowed compare with None
2025-04-22 19:36:59 +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.")