3 ms·
I'm not a good C programmer by any means. I'm in high school and still learning and most of my knowledge is straight from K&R. That being said, I made this shor
by devenblake 6y ago
I'm not a good C programmer by any means. I'm in high school and still learning and most of my knowledge is straight from K&R. That being said, I made this short program for someone I care about:
view-source:https://archive.org/download/aurora_20200721/aurora.c https://archive.org/download/aurora_20200721/aurora.c
Here it is without the ASCII art:
view-source:https://ia801401.us.archive.org/32/items/aurora_20200721/preobfuscated-aurora.c https://ia801401.us.archive.org/32/items/aurora_20200721/pre...
Both compile with a quick `cc aurora.c`. It prints random ASCII to fill up the terminal (I use it at 80x24), and at some point it adds my friend's name (aurora) and highlights it.
She said it was cute.
- lancebeet 6y agoCute. If I'm not mistaken there is a roughly 1% probability that it won't reach 11 instances of ! in which case it won't print your friend's name. Is that intentional? Otherwise maybe you could generate a random position for the aurora string before you run the loop and check for that instead of using the variable a.
- devenblake 6y agoYeah, I think that actually happened in practice too. Fortunately she doesn't know how to compile C code anyway so I was the one providing the screenshot ;)