Skip to content

Instantly share code, notes, and snippets.

@ivang7
Created December 1, 2019 23:50
Show Gist options
  • Save ivang7/4f7748c23600336bda3417fc31205cd9 to your computer and use it in GitHub Desktop.
Save ivang7/4f7748c23600336bda3417fc31205cd9 to your computer and use it in GitHub Desktop.
public int gcd(int a, int b) { return a!= 0 ? gcd(b % a, a) : b; }
public int mlc(int a, int b) { return (a * b) / gcd(a, b); }
http://www.cyberforum.ru/csharp-beginners/thread105689.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment