View Code of Problem 59

#include<stdio.h>
void main()
{
    int x, y;
    int a, b, z;
    scanf("%d %d", &x, &y);
    a= x;
    b = y;
    while(y!=0)
    {
        z = x%y;
        x = y;
        y = z;
    }
    printf("%d %d", (a*b)/x, x);
}

Double click to view unformatted code.


Back to problem 59