stay in the same value of analog input give output one time

HazardsMind:
Your "x" never equals 1, because there is no input for it to change to 1 and at the top you have it as 2.

What are you trying to do with the code, what is its purpose?

The original code was to print out "x" only ONCE, if it equaled 1023 and if the input changed to a new number and then back to 1023.

ok i need add if condition before print "x" to the original code ( print " x " when if condition is valid )