Inspired by old code golf challenges and the latest TIS-100 game. Plus in part of the work for the upcoming demoscene courses. I present a monthly coding challenge to members:
September’s challenge:
Create three functions that outputs either a ‘1’ or ‘0’ for that takes a random integer as input within the range of -2 through +2. The function can only use subtraction, addition and invert the sign.
- Function one outputs ‘1’ or ‘0’ on greater than zero.
- Function two outputs ‘1’ or ‘0’ on equal to zero.
- Function three outputs ‘1’ or ‘0’ on
Bonus points for using only arithmetic. One can use any language they choose though assembly, basic, or ansi-c is prefered.
This month’s prize: Gift card to Starbucks