help me

ok so heres my code and i keep getting a
"error: expected unqualified-id before 'if"
here is my code

int ledPin = 22; // LED connected to digital pin 13
int inPin = 23; // pushbutton connected to digital pin 7
int val = 0; // variable to store the read value

void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin 13 as output
pinMode(inPin, INPUT); // sets the digital pin 7 as input
}

if (inPin==HIGH){
digitalWrite(ledPin,HIGH)
}

please help

int ledPin = 22; // LED connected to digital pin 13
int inPin = 23;   // pushbutton connected to digital pin 7
int val = 0;     // variable to store the read value


void setup()
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin 13 as output
  pinMode(inPin, INPUT);      // sets the digital pin 7 as input
}


void loop( void )  // <--- add this
{  // <--- add this
if (inPin==HIGH){
  digitalWrite(ledPin,HIGH)
}
}  // <--- add this

thankn

You'll also want to add a semicolon like so:digitalWrite(ledPin,HIGH);

-Mike