Print a Comparison Result
mediumQuestion 236You 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, so 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.