Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Basically takes input, then outputs and halts, then if it is reversed it takes an input, pushes -1, then multiplies the input by -1, then outputs and halts.One byte golfed off courtesy of JoKing
Basically takes input, then outputs and halts, then if it is reversed it takes an input, pushes -1, then multiplies the input by -1, then outputs and halts.
Basically takes input, then outputs and halts, then if it is reversed it takes an input, pushes -1, then multiplies the input by -1, then outputs and halts.