remove and in printf statement in conditional