Skip to main content
added 131 characters in body
Source Link
Charlie
  • 12.9k
  • 1
  • 42
  • 100

SuperMarioLang, 2 bytes

:%

Try it online!

A simple answer in SuperMarioLang. The only command that gets executed is : which prints the value of the currently pointed memory position (0) as a number (initially 0). The second command % never gets executed as Mario (the command pointer) falls because there is no floor under him, so the program stops. The average between : and % is 0.

Also works in MarioLANG, where % is just interpreted as a comment.

SuperMarioLang, 2 bytes

:%

Try it online!

A simple answer in SuperMarioLang. The only command that gets executed is : which prints the value of the currently pointed memory position (0) as a number (initially 0). The second command % never gets executed as Mario (the command pointer) falls because there is no floor under him, so the program stops. The average between : and % is 0.

SuperMarioLang, 2 bytes

:%

Try it online!

A simple answer in SuperMarioLang. The only command that gets executed is : which prints the value of the currently pointed memory position (0) as a number (initially 0). The second command % never gets executed as Mario (the command pointer) falls because there is no floor under him, so the program stops. The average between : and % is 0.

Also works in MarioLANG, where % is just interpreted as a comment.

Source Link
Charlie
  • 12.9k
  • 1
  • 42
  • 100

SuperMarioLang, 2 bytes

:%

Try it online!

A simple answer in SuperMarioLang. The only command that gets executed is : which prints the value of the currently pointed memory position (0) as a number (initially 0). The second command % never gets executed as Mario (the command pointer) falls because there is no floor under him, so the program stops. The average between : and % is 0.