CJCoding With Joseph
15free / daySign inCreate account

Print a Boolean as Text

By default cout prints a boolean as 1 or 0. The boolalpha manipulator makes it print true or false instead. Use boolalpha to print the result of the comparison 10 > 7 (see Expected Output).

Expected Output:

true

= newline. No newline after the last line.

Hints2 available
Topics:
Printing
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.