Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
GCD
//Title of this code //V8 3.31.1 function gcd(a,b) { var greatest_divisor = 1; var divisor = 2; if (a<2 || b<2) print(greatest_divisor); else if (a<0 || b<0) print("error"); else { while (a>=divisor && b>=divisor) { if (a%divisor==0 && b%divisor==0) { greatest_divisor = divisor; } divisor++; } print(greatest_divisor); } } gcd(33,55);
run
|
edit
|
history
|
help
0
Time it has been since Tuesday, January 1st, 2019
Wall
JS is_sorted
LazyListJS
First Non Repeating Character
Javascript
linq-style in javascript
MyProfile_Medalla.java
Education-Salary
Precio Helado