Regarding wrong output

Modified code

Check now

sir I am getting a run error and I don’t why

what you want to say??