The input pin that you are connecting the switch to should also be connected to ground via a 5K or 10K resistor. This will keep it from "floating".

Or, to avoid adding another component, you can enable the internal "weak pullups" and connect the switch to ground. And change the input polling code to:

IF SEN=0 THEN

Also vave to make sure the input your using has the weak pullup.

--Jim