Here is the code i am working with, it tests for the input of 'b' and should output 'Y' if there was anything else inputted.
Please, nobody ask why I chose to use 'Y' for a false value..
> , <
+++++ +++++
[
> ----- ----
< -
]
> ----- --- <
[
>
+++++ +++++
[
> +++++ +++
< -
]
> +++++ ++++ <
. <
]
Would like the equivalent of
char c;
c = getchar();
if (c == 'b')
putchar('Y');
I am getting no output (directed it at a file and hexdumped it, as well as nothing on the screen) no matter what I put into the program
After almost 2 years you probably don't need this anymore, but here's my version of "if - else" statement:
+++++ +++++
+++++ +++++
+++++ +++++
+++ (this is the value you want to check, in this case it's the "!")
> , < (then you take input an char to compare)
[ - > - < ] (after that you have to check if their ascii values are the same)
>> (and initialize the answer on "true")
+++++ +++++
+++++ +++++
+++++ +++++
+++++
< [ - > ] > . (if "false", this loop will be executed and the answer won't be printed)
Hope it's usefull to someone today. :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With