fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int a, b;
  6.  
  7. int ucln(int x, int y){
  8. if(y == 0) return x;
  9. return (y, x%y);
  10. }
  11.  
  12. int main()
  13. {
  14. cin >> a >> b;
  15. cout << ucln(a, b);
  16. }
  17.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty