summaryrefslogtreecommitdiff
path: root/31-41/33.hs
diff options
context:
space:
mode:
Diffstat (limited to '31-41/33.hs')
-rw-r--r--31-41/33.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/31-41/33.hs b/31-41/33.hs
new file mode 100644
index 0000000..52bebbb
--- /dev/null
+++ b/31-41/33.hs
@@ -0,0 +1,9 @@
+myGCD :: Int -> Int -> Int
+
+
+myGCD a 0 = abs a
+myGCD a b = myGCD b (a `mod` b)
+
+coprime :: Int -> Int -> Bool
+
+coprime a b = myGCD a b == 1