View Code of Problem 59

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

Double click to view unformatted code.


Back to problem 59