From 116f35a44a2f781646dd252a03a3a94ffdcbad5e Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 10 Jul 2015 03:16:39 -0400 Subject: add c version of some tests --- proto/ctests/eucl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 proto/ctests/eucl.c (limited to 'proto/ctests/eucl.c') 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 + +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; +} -- cgit 1.4.1