Brainfuck Question

Back to General discussions forum

johnnycake     2017-12-23 19:44:28

I've been trying to use the included code running tools to run Brainfuck code, but if your code starts as ;>; you are not prompted for input at the semicolons. Is there a way to provide input? I have been using +'s for input, but in Problem #167 a whole line of text is required as input making the +'s impractical.

Quandray     2017-12-23 21:03:45
User avatar

I don't think I understand what you are asking, but this is what I did ...
I ran my code on the "problem page".
I put the input in the "Test data" area, my code in the "Your solution" area and pressed the "Brainf* *k" button to test it.
A "semicolon" is for reading multi digit numbers, so won't be any good for this problem.
I used "comma" to read each character.

johnnycake     2017-12-23 22:08:41

You've cleared it up for me. Since I've been using Basic I haven't been able to run code on site until now. So you put data in the Test data area. Seems embarrasingly obvious now.

Quandray     2017-12-24 07:35:14
User avatar

It's always "obvious" when you know the answer. :-)

Daniss74     2018-08-31 13:20:36

why is always displayed

Expected answer was: Wrong result for input: 9 0 1

Your input data:5 2 4

what option then need to decide?

Please login and solve 5 problems to be able to post at forum