Answers for "lowest common multiple"

0

lowest common multiple

int gcd (int a, int b) {
    int temp;
    while (a!=0) {
        temp = a;
        a = b%a;
        b = temp;
    }
    return b;
}

int lcm (int a, int b) {
    return a*b/gcd(a, b);
}
Posted by: Guest on February-28-2021

Code answers related to "lowest common multiple"

Browse Popular Code Answers by Language