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.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 algorithms/magic.c (limited to 'algorithms/magic.c') diff --git a/algorithms/magic.c b/algorithms/magic.c new file mode 100644 index 0000000..31e50ea --- /dev/null +++ b/algorithms/magic.c @@ -0,0 +1,65 @@ +#include + + +/* + 1...25 + + 0 0 1 0 0 + 0 0 0 0 0 + 0 0 0 0 0 + 0 0 0 0 0 + 0 0 0 0 0 +*/ +void +magic(unsigned int n) +{ + int a[n][n]; + unsigned int i, j; + + for(i=0; i