Need help on why my code doesn't work

int venstre = 0;
int hoyre = 1;

void setup ()
{
Serial.begin(9600);
}

void loop() {
Serial.print("LDR1: ");
Serial.print(analogRead(venstre));

Serial.print("LDR2: ");
Serial.print(analogRead(hoyre));

int venstreVerdi = analogRead(venstre);
int hoyreVerdi = analogRead(hoyre);

if(venstreVerdi > hoyreVerdi) {
#include <Servo.h>

Servo myservo;

void setup()
{
myservo.attach(9);
myservo.write(140); // sving til venstre

void loop() {}
} //void setup slutt
}//slutt if
else if(hoyreVerdi > venstreVerdi) {
#include <Servo.h>

Servo myservo;

void setup()
{
myservo.attach(9);
myservo.write(40); // set servo til høyre
}

void loop() {}
}//else if slutt
else {
#include <Servo.h>

Servo myservo;

void setup()
{
myservo.attach(9);
myservo.write(90); // set servo to mid-point
}

void loop() {}
}// slutt else4
}//void loop slutt

Hi, please read this : http://forum.arduino.cc/index.php/topic,148850.0.html
Number 7 on that page is about "Code tags", if you use those, we can read the sketch.

You can use only one setup() and one loop() function. I think I see 4 of them is your sketch.

This should be ahead of setup() and loop()

#include <Servo.h>
Servo myservo;

Have you written a sketch before ? Could you start with the basic "Blink" example to blink a led ?

What are the errors given? By the way, please use
code tags.

I can't even list the issues because I have no idea what you did want to make...
Please learn basic programming in C++ because your code is utterly bad, you just will keep asking people to resolve your problems if you don't.
Try this instead :

#include <Servo.h>

const int LDR1_pin = 2;
const int LDR2_pin = 3;

Servo servo;
 
void setup()
{
  Serial.begin(9600);

  servo.attach(9);
  servo.write(0);
}
 
void loop()
{
  int LDR1_val = analogRead(LDR1_pin);
  int LDR2_val = analogRead(LDR2_pin);

  Serial.println("LDR1: " + LDR1_val);
  Serial.println("LDR2: " + LDR2_val);

  if (LDR1_val > LDR2_val)
  {
    servo.write(140);
  }
  else
  {
    servo.write(90);
  }
}