Print a Shelf Label Taken by Const Reference
easyQuestion 683Fill in void printLabel(const string &text).
main is already written: it reads one whole line from input with getline and passes it to printLabel.
printLabel must print two lines - the label text, then how many characters the label contains (use text.length()).
For the input:
Warehouse Bin
the program must print exactly the output shown in Expected Output.
Do not put quotes around the text.
Expected output
Label: Warehouse Bin Length: 13
= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
Pointers
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.