Doubt in the code

I am getting the run time error please correct the error

hello @Adhyayan
read input as string only and then apply ur logic.

image

similar in this comparision dont compare int instead compare them as string.

please make the changes in the code if possible then it will easier for me to understand…

and comment the error if possible

have u tried what i said?
if any point is not clear then feel free to ask

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.