Files
ioccc/2000/natori
Landon Curt Noll ac41f07a83 move fix thanks a file, update top level html links, rename CONTRIBUTING.md
The fix thank you's have been moved from `README.md` to
`thanks-for-fixes.md`.

**WARNING**: Some mistakes may have been made in doing this.
We presume later changes by others will correct any issues.

The `CONTRIBUTING.md` was renamed `how-to-enter.md`.

A 3rd line of links was added to top level html such as
`contact.html`, `index.html`, `judges.html`, `winners.html`,
and `years.html`.

Improved blank line use in a number (but not all) `README.md` files.
2023-06-06 16:59:53 -07:00
..
2023-04-19 13:55:41 -07:00
2023-05-13 11:45:33 +10:00
2023-04-19 13:55:41 -07:00
2023-04-19 13:55:41 -07:00
2023-03-20 09:23:09 -07:00

Best Small Program

NATORI Shin Univ. of Tokyo Rigakubu 7-goukan 311 Hongou 7-3-1, Bunkyou-ku, Tokyo Japan

To build:

make

To run:

./natori

Try:

echo "Do or do not. There is no try."

Alternate code:

The author noted that those in the southern hemisphere might want to change acos(l/2) into acos(-l/2).

To run the alternate code that supports the southern hemisphere:

make alt

Use natori.alt as you would natori.

Judges' remarks:

Here is a nice compact program that changes with the phase of the moon. Can you figure out how it does it?

The ANSI-C committee, among their multiple misdeeds, broke perfectly fun C programs by making it intractable for them to declare their own non-traditional prototype for main(). We have had uglify this program in order to try and prevent C compilers form failing to compile due to the unusual arg types of the main() function.

Author's remarks:

This program outputs a rough image of the moon in its current phase. The main obfuscation of this entry is its complicated double recursion (without any loop or conditional statement).

People living in the southern hemisphere may want to change acos(l/2) into acos(-l/2).

This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. You are free to share and adapt this file under the terms of this license:

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

For more information, see: https://creativecommons.org/licenses/by-sa/4.0/