Skip to content

Instantly share code, notes, and snippets.



Last active Sep 17, 2018
What would you like to do?
int a1 = a,
b1 = b;
while (b1 != 0)
a1 %= b1;
swap(a1, b1);
int GCD = a1,
LCM = (a * b) / GCD;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment