summary refs log tree commit diff stats
path: root/c/square-root/src
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-08-25 20:09:09 +0530
committerAndinus <andinus@nand.sh>2021-08-25 20:09:09 +0530
commit7ec482f4126a6ac5bff7fffaa16c84210df13fac (patch)
treedcc70acb77a9d0a95fa4e6718a8bea687b96f03c /c/square-root/src
parent61d8d8a336ca9a74eaf0e77e6ec9ab59f8bccddb (diff)
downloadexercism-7ec482f4126a6ac5bff7fffaa16c84210df13fac.tar.gz
C: Add square-root exercise
Diffstat (limited to 'c/square-root/src')
-rw-r--r--c/square-root/src/square_root.c5
-rw-r--r--c/square-root/src/square_root.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/c/square-root/src/square_root.c b/c/square-root/src/square_root.c
new file mode 100644
index 0000000..a0232c7
--- /dev/null
+++ b/c/square-root/src/square_root.c
@@ -0,0 +1,5 @@
+#include "square_root.h"
+
+unsigned int square_root(unsigned int radicand) {
+    return radicand;
+}
diff --git a/c/square-root/src/square_root.h b/c/square-root/src/square_root.h
new file mode 100644
index 0000000..849eb9e
--- /dev/null
+++ b/c/square-root/src/square_root.h
@@ -0,0 +1,6 @@
+#ifndef SQUARE_ROOT_H
+#define SQUARE_ROOT_H
+
+unsigned int square_root(unsigned int radicand);
+
+#endif