Digital pins as inputs is bad?

Hello, Im currently working on my project. Our professor asked us to use an ADC on our project.
(Current setup: Force Sensitive Resistor → ADC → MICROCONTROLLER).

Our project should work as:

1.) The user will input 3 consecutive forces at the FSR(but will be processed 1 at a time meaning that per input, the ARDUINO will display a relative response)
2.) The user’s input will go in the ADC and it should be converted into digital outputs
3.) Digital outputs of the ADC were inserted on pins 2-10 of the ARDUINO UNO
4.) 3 correct consecutive inputs will light up the green led while having 1 incorrect input will result to activating the buzzer for 3 seconds.

And I noticed that there are certain problems

Here are the cases:

1.) Once the first input is initiated the LED’s and serial print will display the exact input intended, but for the 2nd input(which it should follow up because im trying to make a sequence of inputs for the door lock to open but instead i used a LED for programming purposes) somehow only the 1st light is lighting up and the serial monitor will display a 8 or 11111111 so i somehow assumed that the first inputs were affecting the 2nd inputs

2.) If i put 0000000 in my first input, my 2nd input acts normally, it displays on the serial monitor the exact input intended, but on my 3rd input, its the same as the 1st problem, it is somehow affected by the 2nd inputs.

Sorry for my bad inefficient programming for I’am still a beginner and I’am hoping for your patience for I’am still bad. I attached my code for the said project named “notepad.txt”. Sorry for my bad english.

notepad.txt (10.1 KB)

The first thing to do with your program is to revise it to use arrays to hold data. Variable names with numeric suffixes is usually a clue to this. Secondly, consider the use of functions, particularly to collect the FSR data to avoid repeated code

Please also see the sticky post at the top on how to use the forum - pay special attention to the posting of code with the code tags - that will make it easier for others to help you as they will not need to download files

thanks & good luck