fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int M,N;
  7. M=16;
  8. N=32;
  9. while(M!=N){
  10. if(M>N) M=M-N;
  11. else N=N-M;
  12.  
  13. }
  14. cout<<M;
  15. }
Success #stdin #stdout 0.01s 5296KB
stdin
5
stdout
16