View Code of Problem 59

#include<stdio.h>
int gys(int a,int b)
{
	if(b==0)
	return a;
	else
	return gys(b,a%b);
}
int gbs(int a,int b)
{
	int c =gys(a,b);
	return a/c*b;
}
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	printf("%d %d",gbs(a,b),gys(a,b));
 } 

Double click to view unformatted code.


Back to problem 59