Welcome to the forum
As Jimbo says, it is not normal to use a pin as an input and an output. Is there a particular reason why you chose to do it this way ?
How have you got the switch and LED wired ?
Please post your code here, but before doing so read the advice in the sticky posts at the start of this forum page, particularly in respect of using code tags when posting the code.