Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int a,b,d,c;
- scanf("%d %d",&a,&b);
- d=a*b;
- while(a!=0)
- {
- c=a;
- a=b%a;
- b=c;
- }
- printf("%d",b);
- printf("\n%d",d/b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement