Refactor, rounded solution terms
This commit is contained in:
5
src/lib.ts
Normal file
5
src/lib.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function gcf(a : number, b : number) : number {
|
||||
if (b > a) return gcf(b, a)
|
||||
else if (b == 0) return a
|
||||
else return gcf(b, a % b)
|
||||
}
|
||||
Reference in New Issue
Block a user