Getting wrong output


please find flaw in my code