Created
May 6, 2020 17:55
-
-
Save KIVagant/8182239cf07838d321c608c0ae137e4a to your computer and use it in GitHub Desktop.
Brainfuck example: yes-no dialogue (if-else condition)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Use the following resources to play with your code: | |
// | |
// - http://bf.doleczek.pl One of the best interpreter. | |
// - https://fatiherikli.github.io/brainfuck-visualizer/ Amazing visualizer to understand the logic (but too slow for big examples) | |
// - https://copy.sh/brainfuck/text.html Text-to-brainfuck transformer to generate strings | |
// | |
// Put here a question text generated in https://copy.sh/brainfuck/text.html. | |
// The question MUST expect "y" (yes, yeah, y**whatever) as the proper answer. | |
// And anything else means "no". | |
[-] | |
,>++++++++++++[<---------->-]<- | |
>+< | |
[>-<[-] | |
// Put here a generated text for "no" answer (https://copy.sh/brainfuck/text.html) | |
[-]>[-]<] | |
> | |
[[-] | |
// Put here a text for "yes" answer https://copy.sh/brainfuck/text.html. | |
[-]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment