josiftepe

Untitled

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