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