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
Wall
My first app
Tik
class Stack
#include
random3
Nth Fibonacci Number
tt
a pipeline generator
Leaning Java Script