logic to print odd and even no