From cf3a29feb5887344b6633ead1b4b6d5657a15a4b Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 15 Jun 2014 03:24:33 +0200 Subject: old stuff: algorithms --- algorithms/magic_coxeter.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 algorithms/magic_coxeter.c (limited to 'algorithms/magic_coxeter.c') diff --git a/algorithms/magic_coxeter.c b/algorithms/magic_coxeter.c new file mode 100644 index 0000000..17d24f6 --- /dev/null +++ b/algorithms/magic_coxeter.c @@ -0,0 +1,63 @@ +#include +#include +#include + + +void +magic(unsigned int n) +{ + int m[n*n]; + + unsigned int i; + for (i=0; i\n", argv[0]); + exit(1); + } + int n = atoi(argv[1]); + if(n%2==0) { + printf("n has to be odd\n"); + exit(1); + } + magic(n); + + return 0; +} + -- cgit v1.2.3