fucketh1cs

[prg] Even Number Check in pointer-ng

Nov 8th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This is a even number check written in pointer-ng, my own Brainfuck derivate. More information on pointer-ng here: http://esolangs.org/wiki/Pointer-ng
  2.  
  3. Commented version:
  4. ++
  5. (Initialize_"2"_for_the_modulo_check)
  6. >,
  7. (Get_input_for_the_number_to_check)
  8. %
  9. (Calculate_modulo)
  10. >++++++++++++++++++++++++++++++++++++++++++++++++
  11. (Add_48_to_the_result_for_the_ASCII_character)
  12. >++++++++++++++++++++++++++++++++++++++++++++++++
  13. (Compare_with_48=0_as_ASCII)
  14. <[->-<]>>+
  15. (If_both_are_the_same,_print_1)
  16. <[->]>:
  17. (Print_the_value_as_int)
  18.  
  19.  
  20.  
  21. Uncommented version:
  22. ++>,%++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++<[->-<]>>+++++++++++++++++++++++++++++++++++<[->]>:
Add Comment
Please, Sign In to add comment