commit 0ad2b60a9d1779be4242ce612a13b6d6082ab628 Author: Vincent Batts Date: Mon Nov 14 10:13:02 2011 -0500 initial commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a43909 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ + +FILES := $(basename $(wildcard *.c)) + +all: $(FILES) + +%: %.c + $(CC) -o $@ $< + +clean: + rm -rf $(FILES) *.o *~ + diff --git a/README b/README new file mode 100644 index 0000000..695ceba --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +to play these, just compile and run like: + +$> ./f1 | aplay + diff --git a/f1.c b/f1.c new file mode 100644 index 0000000..4b43af5 --- /dev/null +++ b/f1.c @@ -0,0 +1,7 @@ +int main() { + int t; + for (t = 0;;t++) { + putchar((t >> 6 | t | t >> (t >> 16)) * 10 + ((t >> 11) & 7)); + } +} + diff --git a/f2.c b/f2.c new file mode 100644 index 0000000..9042bf2 --- /dev/null +++ b/f2.c @@ -0,0 +1,8 @@ + +main() { + int t; + for (t=0;;t++) { + putchar(t*((t>>12|t>>8)&63&t>>4)); + } +} + diff --git a/f3.c b/f3.c new file mode 100644 index 0000000..32304af --- /dev/null +++ b/f3.c @@ -0,0 +1,4 @@ +main(int t) { + for(;;t++) + putchar(t*9&t>>4|t*5&t>>7|t*3&t/1024)-1; +} diff --git a/f4.c b/f4.c new file mode 100644 index 0000000..1d39fa3 --- /dev/null +++ b/f4.c @@ -0,0 +1,10 @@ +int main(int t) { + for (t = 0;;t++) { + int i; + i = (t>>7-(t>>15)&-t>>7-(t>>15)); + if (i==0) + continue; + putchar(t>>4|t&(t>>5)/i); + } +} +