Skip to main content
added 92 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 18
  • 37

CJam, 3 characters

Removed ) as per Martin Ender's suggestion

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ]. Through this, you can build and execute any CJam program using only these three characters.

Calculating 2+2 using only '(~

CJam, 3 characters

Removed ) as per Martin Ender's suggestion

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

Calculating 2+2 using only '(~

CJam, 3 characters

Removed ) as per Martin Ender's suggestion

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ]. Through this, you can build and execute any CJam program using only these three characters.

Calculating 2+2 using only '(~

deleted 21 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 18
  • 37

CJam, 3 characters

Removed ) as per Martin Ender's suggestion

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

Calculating 2+2 using only '(~

CJam, 3 characters

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

CJam, 3 characters

Removed ) as per Martin Ender's suggestion

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

Calculating 2+2 using only '(~

deleted 21 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 18
  • 37

CJam, 43 characters

'()~ 

Similar to the Python one given as an example.

Using ''~ you can makeobtain the ~ character literals of any of these 4 characters. Then using ( and ), it's possible to increment andyou can decrement themit in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through increments/decrementsdecrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

CJam, 4 characters

'()~ 

Similar to the Python one given as an example.

Using ' you can make the character literals of any of these 4 characters. Then using ( and ), it's possible to increment and decrement them in order to get whatever character you want. ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through increments/decrements), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

CJam, 3 characters

'(~ 

Similar to the Python one given as an example.

Using '~ you can obtain the ~ character. Then using (, you can decrement it in order to get whatever character you want (~ is the last printable ASCII character). ~ evals any string as normal CJam code. Strings can be constructed by obtaining the character [ (through decrementing ~), eval'ing it, putting some sequence of other characters, then eval'ing the character ].

Source Link
Business Cat
  • 9.2k
  • 1
  • 18
  • 37
Loading