diff options
author | mjfernez <mjfernez@gmail.com> | 2020-02-09 15:16:26 -0500 |
---|---|---|
committer | mjfernez <mjfernez@gmail.com> | 2020-02-09 15:16:26 -0500 |
commit | 93ea7fe5957b62f18e8fbd17a21696bd7de6332d (patch) | |
tree | d90aed60d687bcf195f1150777f37cbe8a149814 /smallmult.c | |
parent | 125ec5bc3d8bfc224b7d32bcfbbc37b9fb5d441f (diff) | |
download | Project_Euler_Solutions-93ea7fe5957b62f18e8fbd17a21696bd7de6332d.tar.gz |
Organized everything, update README
Diffstat (limited to 'smallmult.c')
-rw-r--r-- | smallmult.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/smallmult.c b/smallmult.c deleted file mode 100644 index 302f19b..0000000 --- a/smallmult.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> - -// num: the number to divide -// gd: the greatest divisor to count up to -int isDivisible(int num, int gd){ - int divisible = 1; - for(int i = 1; i < gd; i++){ - if(num % i != 0) - divisible = 0; - } - return divisible; -} - -int main(){ - int found = 0; - int start = 2520; - while(!found){ - start += 20; - found = isDivisible(start, 20); - } - printf("%d\n", start); -} |