Init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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.")
|
||||
Reference in New Issue
Block a user