diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-07-10 03:16:39 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:27 -0400 |
commit | 116f35a44a2f781646dd252a03a3a94ffdcbad5e (patch) | |
tree | cd1a4dd61c3ba27ddd60f3149b10f243c87e282f /proto/ctests/eucl.c | |
parent | 037c716b6514cc717b7208457fb72085e4c278ab (diff) | |
download | roux-116f35a44a2f781646dd252a03a3a94ffdcbad5e.tar.gz |
add c version of some tests
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; +} |