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