Okay. i got it but one more doubt

but both of our output is same. so what is particularly wrong in mine?

please share the code as well