Apologies I'm a bit of a noob in regards to C++, but I keep getting an error message when I try to run this

void loop() {
// put your main code here, to run repeatedly:
#define LED_PIN 13
int state;
void setup ()
{
pinMode(LED_PIN, OUTPUT);
state = 0;
}
void loop ()
{
digitalWrite(LED_PIN, state);
state = !state;
delay (225);
}
1Preformatted text
}

Unedited code copypasted from original pdf:

#def ine LED PIN 13
int s t a t e ;
void se tup ( )
{
pinMode (LED PIN , OUTPUT) ;
s t a t e = 0 ;
}
void l o o p ( )
{
d i g i t a lW r i t e (LED PIN , s t a t e ) ;
s t a t e = ! s t a t e ;
d el a y ( 2 2 5 ) ;
}

Error message:

^
exit status 1
a function-definition is not allowed here before '{' token

I tried both the "run once" and "run repeatedly" options, and have messed with the spacing and brackets. This is not my work but is a school assignment in which we try to replicate some code given to us, I would post the original pdf but the forum won't let me.
Cheers.

At the start of the code remove this. Also remove the last } in the code. And then remove the last line 1Preformatted text

Where are these then?

You have a space between each character, you should not have this.

It will now you have made your first post.

These parts of your sketch are valid and should work fine:

#define LED_PIN 13
int state;

void setup ()
{
  pinMode(LED_PIN, OUTPUT);
  state = 0;
}

void loop ()
{
  digitalWrite(LED_PIN, state);
  state = !state;
  delay (225);
}

Ok, I will double check then. I have rather limited communication with my professor right now so I may have also missed some information or equipment, thank you for the response!

Change delay to 1000 (delay(1000)) to see clearly the blinking of Led-L of the UNO Board.

you are meant to delete the template code arduino gives you if you have complete code to copy paste, didn’t your professor tell you?

No I was online for the class this past week, communication has not been easy as of late. Thank you for the suggestion!