Skip to content

Commit

Permalink
greatest common divisor
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypatel208 committed Sep 12, 2023
1 parent 12c80ba commit 410131e
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 11 deletions.
124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/Greatest_Common_Divisor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

public class Greatest_Common_Divisor {
public static void main(String[] args) {
System.out.println(gcd(20, 10));
}

public static int gcd(int p, int q) {
if (q == 0) return p;
int r = p % q;
return gcd(q, r);
}
}
11 changes: 0 additions & 11 deletions src/Main.java

This file was deleted.

0 comments on commit 410131e

Please sign in to comment.