Hi,
You can use System.in to read values from console.
thus get X value from user and pass that to determine whether odd or even.