From 7ec482f4126a6ac5bff7fffaa16c84210df13fac Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 25 Aug 2021 20:09:09 +0530 Subject: C: Add square-root exercise --- c/square-root/src/square_root.c | 5 +++++ c/square-root/src/square_root.h | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 c/square-root/src/square_root.c create mode 100644 c/square-root/src/square_root.h (limited to 'c/square-root/src') 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 -- cgit 1.4.1-2-gfad0