View Code of Problem 59

#include<stdio.h>
#include<math.h>
int l(int a,int b)
{   int m,n;
m=a;n=b;
	int c;
	while(b!=0)
	{
	c=a%b;
    a=b;
	b=c;
	
	}
printf("%d %d",m*n/a,a);
return 0;
}


int main()
{
int m,n;
scanf("%d%d",&m,&n);
l(m,n);
}

Double click to view unformatted code.


Back to problem 59