View Code of Problem 59

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

Double click to view unformatted code.


Back to problem 59