WHAT IS THE PROBLEM IN MY CODE IT IS RUNNING ABSOLUTELY FINE
the code given by you and the one written by me gives the same output