selecting numbers with a potmeter

//

wvmarle:
So what do you have (post code) and where does it go wrong?

wvmarle:
So what do you have (post code) and where does it go wrong?

int pMin = 14;
int pMax = 948;
int x = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
x = analogRead(A0);

Serial.print(x);

x = map(x, pMin, pMax, 0, 24);
Serial.print("\t");
Serial.println(x); delay(100);
}

this shows in the serial monitor numbers between 0-25 now i have to write a code that i can select 4 numbers with 4 presses on a button but i have no idea where to start , these 4 numbers work like a password , so when the 4 numbers are correct a green light lights up and if u choose 4 wrong numbers a redlight shows up