when i am running this code its showing right output even for negative numbers but test cases are not getting passed.why?
and how we will came to know whether to check for negative no or not for test cases.as in the previous questions it was not asked to check for it.