โ Back to Interfaces
Question 603
Interface Method Returning a Boolean
Interface Method Returning a Boolean
The interfaceINumberCheckerdeclaresbool IsEven(int n). Complete theNumberCheckerclass soIsEvenreturnstruewhennis even andfalseotherwise. Do NOT write aMainmethod. Note that C# prints booleans asTrueandFalse. ForIsEven(4)the program prints: True
Expected Output:
True
Topics:
Interfaces
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.