code is not running and it’s written that scn is a resource leak and it’s nevr closed
Probelm in running codes of conditional if else statements
The ‘scanner is never closed’ statement is just a suggestion and you can ignore it. It does not affect your code. There would be some other error in the code, save your code to https://ide.codingblocks.com/ and share it here so that I can help you debug.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.