balance-codespree

i write a solution code bt after running it seems that the answer is wrong but in my dev c++ it gives correct answer and running succesfully…why