summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorolivier gayot <ogayot@free.fr>2012-12-12 22:22:25 +0000
committerolivier gayot <ogayot@free.fr>2012-12-12 22:22:25 +0000
commita68838f0f6873979e3dcb2c8c8b8ef10017fefc3 (patch)
tree18622ce60a9227002134f6456173f11faae73170 /main.c
le_compte_est_bon: implementation of the solver
Diffstat (limited to 'main.c')
-rw-r--r--main.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..4a8fd98
--- /dev/null
+++ b/main.c
@@ -0,0 +1,26 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "solver.h"
+
+int main(int argc, char **argv)
+{
+ vect_t vect;
+
+ if (argc != 8) {
+ puts("takes exactly 7 args");
+ return -1;
+ }
+ vect.array = malloc(sizeof(int) * 6);
+ vect.array[0] = atoi(argv[1]);
+ vect.array[1] = atoi(argv[2]);
+ vect.array[2] = atoi(argv[3]);
+ vect.array[3] = atoi(argv[4]);
+ vect.array[4] = atoi(argv[5]);
+ vect.array[5] = atoi(argv[6]);
+
+ vect.len = 6;
+ solve(&vect, atoi(argv[7]));
+ free(vect.array);
+
+ return 0;
+}