← Back to Printing
Question 236
Print a Comparison Result
Print a Comparison Result
You can interpolate the result of a comparison, which is a boolean. In C#, a bool prints as True or False with a capital first letter. Given a = 10 and b = 4, print a line that reports both numbers and whether a is greater than b, exactly like this: 10 is greater than 4: True. Let C# evaluate the comparison a > b inside the interpolation.
Expected Output:
10 is greater than 4: True= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
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 (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.