diff options
| author | Hyder <hyder@hyderhadi.xyz> | 2025-08-01 12:57:32 +0300 |
|---|---|---|
| committer | Hyder <hyder@hyderhadi.xyz> | 2025-08-01 12:57:32 +0300 |
| commit | b33286ab5173b58e3f982c39b0938f8b66beab16 (patch) | |
| tree | 62bf28b77de1729895ab28a4754c18c24da3a9a5 /GCD.c | |
| parent | 2d5fc9c45bd3f7a1128096317acee6b93dce1ec9 (diff) | |
Added README to organize
Diffstat (limited to 'GCD.c')
| -rw-r--r-- | GCD.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -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 |
