aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GCD.c23
-rw-r--r--README.md5
2 files changed, 5 insertions, 23 deletions
diff --git a/GCD.c b/GCD.c
deleted file mode 100644
index 2f857f8..0000000
--- a/GCD.c
+++ /dev/null
@@ -1,23 +0,0 @@
-# include <stdio.h>
-
-int GreatestCommonDivisor(int INPUT_ONE, int INPUT_TWO) {
- int DIVISOR;
- for (int i = 1; i < INPUT_ONE || i < INPUT_TWO;++i) {
- if (INPUT_ONE % i == 0 && INPUT_TWO % i == 0) {
- DIVISOR = i;
- }
- }
- return DIVISOR;
-}
-
-
-int main() {
- int INPUT_ONE;
- int INPUT_TWO;
- printf("Give me a TWO numbers to find GCD\n");
- while (scanf("%d %d", &INPUT_ONE, &INPUT_TWO) != EOF) {
- int RESULT = GreatestCommonDivisor(INPUT_ONE, INPUT_TWO);
- printf("%d\n\n", RESULT);
- }
- return 0;
-} \ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..932c7b6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# Random Stuff as a learning journal
+
+## Contents
+
+- [GCD](GCD/): The greatest common divisor exercise solution. \ No newline at end of file