Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,ah,bh;
- cin>>a;cin>>b;
- ah = a; bh = b;
- while(ah!=bh)
- {
- while (ah<bh)
- ah+=a;
- while (bh<ah)
- bh+=b;
- }
- cout<<endl<<bh;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement