diff options
Diffstat (limited to 'proto/ctests/eucl.c')
-rw-r--r-- | proto/ctests/eucl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/proto/ctests/eucl.c b/proto/ctests/eucl.c new file mode 100644 index 0000000..fd2e9c9 --- /dev/null +++ b/proto/ctests/eucl.c @@ -0,0 +1,17 @@ +#include <stdio.h> + +int main() +{ + int a = 123456; + int b = 32223; + int t; + + do { + t = a % b; + a = b; + b = t; + } while (b); + + printf("%d\n", a); + return 0; +} |