Skip to main content
added 5 characters in body
Source Link
cat
  • 6.1k
  • 2
  • 27
  • 45

3 languages, 3 years

An ad-hoc answer for fun.

2002!~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !. 
  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calcthis pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

3 languages, 3 years

An ad-hoc answer for fun.

2002!~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !. 
  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

3 languages, 3 years

An ad-hoc answer for fun.

2002!~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !. 
  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

added 154 characters in body
Source Link
cat
  • 6.1k
  • 2
  • 27
  • 45

23 languages, 23 years

An ad-hoc answer for fun.

2002!~~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !. 

In Mouse-2002, everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

In this pre-challenge commit of Calc, which is a stack-based calculator interpreter I just designed in C11 for Programming II, 2002!~ prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

2 languages, 2 years

An ad-hoc answer for fun.

2002!~ 2016 !. 

In Mouse-2002, everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

In this pre-challenge commit of Calc, which is a stack-based calculator interpreter I just designed in C11 for Programming II, 2002!~ prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

3 languages, 3 years

An ad-hoc answer for fun.

2002!~+++++++[<+++++++>-]<[.++++++++..------.[-]] 2016 !. 
  • Mouse-2002: everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

  • this pre-challenge commit of Calc: which is a stack-based calculator interpreter I just designed in C11 for Programming II, the part of the program before the first space prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

  • Brainfuck: prints 1993 as seen in other answers. The final extraneous . is ignored by beef.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.

Source Link
cat
  • 6.1k
  • 2
  • 27
  • 45

2 languages, 2 years

An ad-hoc answer for fun.

2002!~ 2016 !. 

In Mouse-2002, everything after ~ is a comment, and the first part, which could also be written C0U!!!, prints 2002.

In this pre-challenge commit of Calc, which is a stack-based calculator interpreter I just designed in C11 for Programming II, 2002!~ prints an error (allowed under the challenge spec), and 2016 !. prints 2016.

Note that Calc's display of the current stack < stack with every non-empty input line is part of the prompt >, not part of the output.