Advertisement
Josif_tepe

Untitled

Jan 21st, 2022
967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int vistina, razum;
  8.     cin >> vistina >> razum;
  9.     for (int i = 1; i <= vistina; i++)
  10.     {
  11.         if (vistina % i == 0 and razum % i == 0)
  12.         {
  13.             cout << i << endl;
  14.         }
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement