what's wrong in my code, last condition is not satisfied give me solution