![DropDown image](dropdown.gif)
![DropDownHover image](dropdownHover.gif)
![Collapse image](collapse_all.gif)
![Expand image](expand_all.gif)
![CollapseAll image](collall.gif)
![ExpandAll image](expall.gif)
![Copy image](copycode.gif)
![CopyHover image](copycodeHighlight.gif)
function GCD(a,b){
if (a>b) return GCD(a-b,b);
else
if (b>a) return GCD(a,b-a);
else
return a;
}
//Non recursive function
function GCD_fast(a,b){
while ( a!=b )
{
if (a>b) a = a-b;
else
if (b>a) b = b-a;
}
return a;
}
function GCD(a,b){
if (a>b) return GCD(a-b,b);
else
if (b>a) return GCD(a,b-a);
else
return a;
}
//Non recursive function
function GCD_fast(a,b){
while ( a!=b )
{
if (a>b) a = a-b;
else
if (b>a) b = b-a;
}
return a;
}