From c696b4d6ded69074cd08c51b91eabeaeac5823ac Mon Sep 17 00:00:00 2001 From: standenboy Date: Mon, 18 Mar 2024 13:21:36 +0000 Subject: did homework --- comp/work/28/2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 comp/work/28/2.py (limited to 'comp/work/28/2.py') diff --git a/comp/work/28/2.py b/comp/work/28/2.py new file mode 100644 index 0000000..5e344e4 --- /dev/null +++ b/comp/work/28/2.py @@ -0,0 +1,10 @@ +def gcf(num1, num2): + while num1 != num2: + if (num1 > num2): + num1 = num1 - num2 + else: + num2 = num2 - num1 + return num1 + + +print(gcf(10, 20)) -- cgit v1.2.3