the best way

hello everybody,
in your opinion what is the best way for write a program that at the same time, when I press, and keep pressed, the button 5 the led is off till I take off my finger and, independently at what is the state of button 5, when I press the ‘‘switch’’ ( button 4 ) the led turn off until I press again the same button?
thanks to all
Andrea Fipilli

fito_89:
hello everybody,
in your opinion what is the best way for write a program that at the same time, when I press, and keep pressed, the button 5 the led is off till I take off my finger and, independently at what is the state of button 5, when I press the ''switch'' ( button 4 ) the led turn off until I press again the same button?
thanks to all
Andrea Fipilli

Why are you using a 220 Ohm pull-down resistor on one of your switches? Both should be around 10K.
For your program, write an ordered list of all the conditions it can be in. That will get it clear in your mind and you will be able to describe to us exactly what you want it to do.

Problem statement is Improper.
What is role of 2 push buttons???

you create some table that way easy to understand. Like truth table of logical gate.
Since you using 2 button there will be 4 conditions:

both switch are low and high
both switches either low or high

In 4 situation what is action of LEd. you decide and create truth table share it