Output for negative and 0 values for N

I am unable to pass all test cases since it says you have not accounted for negative values or 0… But I am unable to figure out what the output should be if N is negative, i.e what is the output that is printed if a user enters a negative value, like -5, or 0?

Dang! You couldn’t score a perfect 100 because you failed one or more testcases. This means that your program didn’t account for all input cases (did you account for negative numbers, for example?).

Hello @Ramya1706 i have corrected your code and now it is printing the correct result.
dont print space in between.


if you have any doubt you can ask here:
Happy Learning!!

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.