View Code of Problem 59

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

Double click to view unformatted code.


Back to problem 59