Skip to main content
Tweeted twitter.com/StackCodeGolf/status/661513431196024832
added 13 characters in body
Source Link
Luke
  • 5.4k
  • 1
  • 22
  • 39

Write a complete program that takes a boolean or non-negative integer input. It must:

  • Output its own source code if the input value is falsy
  • Output its own source code in reverse if the input value is truthy

Your program cannot be palindromic, nor can it read its own source code by any means.

This is code golf - shortest code in bytes wins.

Write a complete program that takes a boolean or integer input. It must:

  • Output its own source code if the input value is falsy
  • Output its own source code in reverse if the input value is truthy

Your program cannot be palindromic, nor can it read its own source code by any means.

This is code golf - shortest code in bytes wins.

Write a complete program that takes a boolean or non-negative integer input. It must:

  • Output its own source code if the input value is falsy
  • Output its own source code in reverse if the input value is truthy

Your program cannot be palindromic, nor can it read its own source code by any means.

This is code golf - shortest code in bytes wins.

Source Link
Luke
  • 5.4k
  • 1
  • 22
  • 39

Quine / Reverse Quine

Write a complete program that takes a boolean or integer input. It must:

  • Output its own source code if the input value is falsy
  • Output its own source code in reverse if the input value is truthy

Your program cannot be palindromic, nor can it read its own source code by any means.

This is code golf - shortest code in bytes wins.