View Code of Problem 59

#include<stdio.h>
int  main(){
    char z[100],c;
	int i,j=0,s1,s2,f1,f2,m1,m2,s,f,m=0,temp,max,min,a,b;
    scanf("%d %d",&a,&b);
	if(a<b){
	  temp = b;
	  b = a; 
	  a= temp;
	}
    i=a;
	j=b;
	while(b!=0){
	   m = a%b;
	   a = b;
	   b= m;
	}

	printf("%d %d",i*j/a,a);
     
	return 0;
}

Double click to view unformatted code.


Back to problem 59