Skip to content

Commit

Permalink
File needed for notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanhorn committed Dec 2, 2024
1 parent 167e539 commit 4eb7c23
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions evildoer/gcd.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <inttypes.h>

int64_t gcd(int64_t a, int64_t b) {
int remainder = a % b;

if (remainder == 0) {
return b;
}

return gcd(b, remainder);
}

0 comments on commit 4eb7c23

Please sign in to comment.