fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x,y;
  5. x=10;
  6. y=5;
  7. while(x!=y){
  8. if(x>y){
  9. x=x-y;
  10. }
  11. else{
  12. y=y-x;
  13. }
  14. }
  15. printf("%d",x);
  16.  
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5312KB
stdin
3
6
stdout
5