CJCoding With Joseph
15per day

Print Yes or No with a Ternary

A bool isOpen is true. Use a ternary (condition ? a : b) inside the output to print 'Yes' when it is true, otherwise 'No':

Yes

Expected Output:

Yes
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.