Challenge
Your program will take in a string from stdin, and output multiple lines to stdout.
An example of input looks like this:
My favorite Chipotle order:
B1113YNNY
Let's break it down:
- The first character is either A (burrito), or B (burrito bowl).
- The second character is 1 (black beans), or 2 (pinto beans).
- The third character is either 1 (white rice), or 2 (brown rice).
- The fourth character is either 1 (chicken), 2 (sofritas), or 3 (steak).
- The fifth character is either 1 (mild salsa), 2 (medium salsa), or 3 (hot salsa).
- The last four characters are Y if they want the item, or N otherwise:
- character 6 is corn
- character 7 is guacamole
- character 8 is sour cream
- character 9 is cheese
A working program for this challenge will output this to stdout:
burrito bowl with:
black beans
white rice
chicken
hot salsa
corn
cheese
Replace the above words with the words acquired from input.
Clarifications.
Standard loopholes are disallowed.
You may only get input from stdin, and only put output to stdout.