print salary on the basis of condition.