Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- int b;
- int x;
- cin>>a;
- cin>>b;
- x=1;
- while(a*b>x){
- x+=1;
- if ((x%b==0) and (x%a==0)){
- cout<<x;
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment