First, I notice you are allocating space for the variable x, but you do not assign x a value. And then you have the statement
while ( (x%2 == 0)||(x<=0) )
Perhaps you should move this statement down to a point after
x has been assigned a value.
You might also do a quick check right after input that the value actually is an integer rather than a letter or something else (try to catch errors in the input data).