This commit is contained in:
Joaquin Gottlebe
2025-07-30 15:57:48 +02:00
parent e49fcfac46
commit a639c34cee
273 changed files with 20151 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
class Gcd{
public static int gcd(int num, int denom){
int x = num;
int y = denom;
if (x == 0)
return y;
if (y == 0)
return x;
if (x < 0)
x = -x;
if (y < 0)
y = -y;
while (x != y) {
if (x > y)
x = x - y;
else
y = y - x;
}
return x;
}
}