IOCCC image by Matt Zucker

The International Obfuscated C Code Contest

2024/kurdyukov1 - Prize in phased periodicity

phase of the Moon

Author:

To build:

    make all

To use:

    ./prog

Try:

    ./try.sh

Judges’ remarks:

Comparing this entry to 2000/natori, which does something similar, is quite instructive. This entry does not use floating point, and the only common magic number is 2551443 (what does it mean?). How is this entry able to achieve a similar result?

Author’s remarks:

Moon Phase

This code draws the current moon phase to the console. So if you’re a lycanthrope, you can monitor the phase of the moon.

Customization

  1. It shows a view from the northern hemisphere, to see from the southern replace <a*(~ with >=a*(. Can’t show a view near the equator.

  2. The code assumes that your terminal color is dark and the text color is bright. If not, you can change "#." characters in the source code to suit your case.

Inventory for 2024/kurdyukov1

Primary files

Secondary files


Jump to: top