checking dual occurrence of x variable

checking that the user does not input x twice.