fork download
  1. #include <stdio.h>
  2. #include <iso646.h>
  3.  
  4. int gcd(int x, int y)
  5. {
  6. int i,j,temp1,temp2;
  7.  
  8. for(i =1; i <= (x<y ? x:y); i++)
  9. {
  10. temp1 = x%i;
  11. temp2 = y%i;
  12. if(temp1 ==0 and temp2 == 0)
  13. j = i;
  14. }
  15. return j;
  16. }
  17.  
  18. int main(void) {
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 1828KB
stdin
Standard input is empty
stdout
Standard output is empty