Problem with the digital read inside of the loop

I have 3 sequency in this program but the if inside of the while do not good working

Q3_Programming_Elian_TEST_2_NO_DNAR_Elian_Otra.ino (13.3 KB)

First, please read the sticky at the top of the forum: "Read this before posting a programming question .."

Use CTRL-T in the IDE. This will clean up the code for you a lot.

Last, what is the question? You need to be more specific than "not working". You have three if statements in the while loop, so which one is not working?

I don't think the break statements are doing what you think they should. What do you think the break statements are doing?

Loop two and three do not work well because it seems that digital read are not reading well.

You still have not provided anywhere near enough information for us to provide any meaningful help.

From the comments, it looks like your inputs are switches. How do you have these switches wired?

Are you intentionally reading from the output pins? Although I do know that works on the AVR boards, I don't think there's any guarantee it will work on all architectures. Which Arduino board are you using?

Since you're being so vague, I can only recommend you to add some Serial.println() statements at strategic locations in your sketch and then run the sketch with Tools > Serial Monitor open. That will allow you to see what is happening in your program.