Please tell me the error

Hey @adarshsingh2k
Correction in line 25

if(d==-1)

What if i dont want to use -1 .

Then you have to change the way of taking input

what will be the code then

It depends on how you are taking input
Dont worry you will learn multiple ways of taking input in coming lectures and questions