fork download
  1. #include <stdio.h>
  2. int main (void)
  3. {
  4. int u,v,temp;
  5. printf("Please type in two nonnegative n");
  6. scanf("%i%i",&u,&v);
  7. while ( v != 0 )
  8. {
  9. temp = u % v;
  10. u = v;
  11. v = temp;
  12. }
  13. printf("Their greatest common divisor is i n", u);
  14. return 0;
  15. }
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
Please type in two nonnegative nTheir greatest common divisor is i n