fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int a = 54, b = 32;
  7. int r;
  8. do {
  9. r = a % b;
  10. a = b;
  11. b = r;
  12. } while (r > 0);
  13. cout << a << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
2