I dont know why Arduino Soft gives me this error

Hello everyone, i need help in a program who i am doing to on a led, but the program gives me a error(

sketch_dec28e:17: error: expected unqualified-id before '?' token

}?

^

exit status 1
expected unqualified-id before '?' token

)and i dont know why, please help me, here is the code of the program and some extra info :

CODE :
int PULSADOR = 2;
int LED=3;
int Estado=LOW;

void setup(){
pinMode(PULSADOR, INPUT);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);

}

void loop (){
while(digitalRead(PULSADOR)==LOW);
Estado = digitalRead(LED);
digitalWrite(LED, !Estado);
while(digitalRead(PULSADOR)==HIGH);
}

EXTRA INFO :
Arduino:1.8.5 (Windows 10), Tarjeta:"Arduino/Genuino Uno"

sketch_dec28e:17: error: expected unqualified-id before '?' token

}?

^

exit status 1
expected unqualified-id before '?' token

The compiler is seeing a question mark character at the end of line 17. That character does not appear in the code you posted. It's possible there is an invisible character. Try copy and pasting the code you posted above into the Arduino IDE. That will remove any hidden characters and should fix the error.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.... :slight_smile: