Q:

When I try to compile the following code in Arduino ,I get the error "expected initializer before 'void'".How can I get the code to work?

When I try to compile the following code in Arduino ,I get the error "expected initializer before 'void'".How can I get the code to work? 
const int LED = 9;
const int BUTON = 2

void setup() {
  pinMode (LED, OUTPUT);
  pinMode (BUTON, INPUT);
}

void loop() {
  if (digitalRead(BUTON) == HIGH);
  {
    digitalWrite(LED, HIGH);
  }
  else
  {
    digitalWrite(LED, LOW);
  }
}

A:

You are missing a semi-colon after const int BUTON = 2
Each expression should be terminated with a semi-colon.  Your code should look like this:
const int LED = 9;
const int BUTON = 2;

void setup() {
  pinMode (LED, OUTPUT);
  pinMode (BUTON, INPUT);
}

void loop() {
  if (digitalRead(BUTON) == HIGH)
  {
    digitalWrite(LED, HIGH);
  }
  else
  {
    digitalWrite(LED, LOW);
  }
}

