View Code of Problem 59

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

Double click to view unformatted code.


Back to problem 59