Unable to find the error


this code is not giving the correct answer, i think there is a mistake in one of the condition, please look into this!