right output is coming on terminal but CB editor it is giving error. why?
Showing error on cb editor
please donβt send your code in response,if you will correct my approach then that will be best.
@narayansatish Just change return 1 to return 0. It will work.
Whenever working with online IDE or anywhere it is better to return 0, most of them assume 0 for success and 1 for some error.
When you are working offline your code is mostly standalone, so whatever value you return does not matter as this is not used.
If this resolves your doubt mark it as resolved.
1 Like