โ Back to Printing
Question 288
Print a Boolean as Text
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: true
Expected Output:
true
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.