SHARE
TWEET

Untitled

a guest Jul 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int GCD(int a, int b);
  5.  
  6. int main() {
  7.     int a, b;
  8.     cin >> a >> b;
  9.  
  10.     cout << GCD(a, b);
  11.     return 0;
  12. }
  13. int GCD(int a, int b) {
  14.     if (b == 0)
  15.         return a;
  16.     else
  17.         return GCD(b, a%b);
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top