summaryrefslogtreecommitdiff
path: root/comp/work/28/2.py
diff options
context:
space:
mode:
authorstandenboy <standenboy@seacrossedlovers.xyz>2024-03-18 13:21:36 +0000
committerstandenboy <standenboy@seacrossedlovers.xyz>2024-03-18 13:21:36 +0000
commitc696b4d6ded69074cd08c51b91eabeaeac5823ac (patch)
treeee8b7ff08580a3bffc237c5b8bac9a8bc26d2516 /comp/work/28/2.py
parent647d3b98658ddae66882badc508633c9a33eff32 (diff)
did homework
Diffstat (limited to 'comp/work/28/2.py')
-rw-r--r--comp/work/28/2.py10
1 files changed, 10 insertions, 0 deletions
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))