#C11294. Brainfuck Translator
Brainfuck Translator
Brainfuck Translator
You are given a string representing a simplified Brainfuck script. The script contains only the characters '+', '-', '>', '<', '[', ']', and '.'. Your task is to convert each of these characters into a human-readable command according to the following mapping:
- \( + \) : Increment current cell
- \( - \) : Decrement current cell
- \( > \) : Move pointer to next cell
- \( < \) : Move pointer to previous cell
- \( [ \) : Jump to matching ] if current cell is 0
- \( ] \) : Jump back to matching [ if current cell is not 0
- \( . \) : Output current cell value
For each character in the input string which is part of the mapping above, output the corresponding command followed by a newline. If the input string is empty, output nothing.
inputFormat
The input consists of a single line, which is a string of characters representing a Brainfuck script. The string may contain only the characters '+', '-', '>', '<', '[', ']', and '.'.
outputFormat
Output the translated commands corresponding to each valid character in the script. Each command must be printed on its own line. The output should exactly match the expected commands and formatting.
## sample++
Increment current cell
Increment current cell
</p>