Guest User

Untitled

a guest
Dec 11th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a,b,s,c,i;
  6. setlocale(LC_ALL,"Russian");
  7. cin>>a>>b;
  8. c=a*b;
  9. s=a*b;
  10. for(i=1;i<=c;i++){
  11. if ((i%a==0)&&(i%b==0)){
  12. s=i;
  13. break;
  14. }
  15. }
  16. cout<<s<<endl;
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment