Pump Starting Problem

Hi there !
My main object is to start the pump when the water level in tank
falls below the Level 1 but in the following code the pump starts
at level 2,Please help me to correct this problem.

#include <EEPROM.h>

// CONSTANTS
// INPUT PINS
#define ReedSwA1  6  //Tank1 Level1
#define ReedSwA2  7  //Tank1 Level2
#define ReedSwA3  8  //Tank1 Level3
#define AutoMan   10 //Auto/manual button
// OUTPUT PINS
#define ledpinA1  2 //Tank1 Level1 Display
#define ledpinA2  3 //Tank1 Level2 Display
#define ledpinA3  4 //Tank2 Level1 Display
#define AutoManLed  11  //Auto/manual operation
#define RelayPIN 12 // Pin for water pump activation

// EEPROM MEMORY POSITIONS
#define memposL1  2  // set constant eeprom position 0 to save Level1

// variables
int state=0;
int level = 0;
int lastlevel = 0;

void setup (){
pinMode(AutoMan,INPUT);            // default mode is INPUT
pinMode(ReedSwA1,INPUT);            // default mode is INPUT
pinMode(ReedSwA2,INPUT);            // default mode is INPUT
pinMode(ReedSwA3,INPUT);            // default mode is INPUT

digitalWrite(AutoMan, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(ReedSwA1, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(ReedSwA2, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(ReedSwA3, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH


pinMode(RelayPIN, OUTPUT);
pinMode(ledpinA1, OUTPUT);
pinMode(ledpinA2, OUTPUT);
pinMode(AutoManLed, OUTPUT);
pinMode(ledpinA3, OUTPUT);


// Restore tank water Level from eeprom 
level = EEPROM.read(memposL1); // Read from eeprom memPos1 the value of Level1
lastlevel = level;                        // also update the according lastLevel variable
if ((level == 0)||(level>3)) { 	 // if eeprom has illegal value
level=1;			 // set level to 1 (minimum)
updateprom(); // call updateprom function to set eeprom memory value to minimum too.
}
setleds(); // restore the reed states from EEPROM stored value.
delay(1000);
startstoppump();
}


void setleds() {
  digitalWrite(ledpinA1, LOW );
  digitalWrite(ledpinA2, LOW );
  digitalWrite(ledpinA3, LOW );
  if (level > 0)   digitalWrite(ledpinA1, HIGH );
  if (level > 1)   digitalWrite(ledpinA2, HIGH );
  if (level > 2)   digitalWrite(ledpinA3, HIGH );
 }

void  startstoppump(){ 
 [color=red]if (level < 1)   digitalWrite(RelayPIN, HIGH );[/color]
  if ((level == 3) & (state == 0)) {
    digitalWrite(RelayPIN, LOW );
}
else {
    digitalWrite(RelayPIN, HIGH );
}
}

void updateprom() {
  // UPDATE LEVEL 1
lastlevel = level;      // update lastLevel variable
EEPROM.write(memposL1, level);   // and store new Level value to eeprom
}

void loop () {
  if ( (digitalRead(AutoMan) == LOW) & (state == 0) ) { // Button  pushed
         state=1;  
         digitalWrite(AutoManLed, state );        // Turn on the LED
         startstoppump();
         delay(400);
  }
  
  if ( (digitalRead(AutoMan) == LOW) & (state == 1)  ) { // Button  pushed
         state=0;  
         digitalWrite(AutoManLed, state );        // Turn off the LED
         startstoppump();
         delay(400);
   } 
 
  if ( digitalRead(ReedSwA1) == LOW  ) { // Button  pushed
 level = 1;
 }
 
  if ( digitalRead(ReedSwA2) == LOW  ) { // Button  pushed
 level = 2;
 }

  if ( digitalRead(ReedSwA3) == LOW  ) { // Button  pushed
 level = 3;
 }

 
 if (level != lastlevel) {
   setleds();
   startstoppump();
   updateprom();
 }   
  
}

Trying to color code doesn't work.

Use Serial.begin() in setup() and Serial.print() and Serial.println() in loop() and other functions to see what value is read for level, and what value it has at the end of setup.

What value does level have in startstoppump()?

As an aside, perhaps you've noticed that there are functions like analogRead and digitalWrite. Perhaps you've noticed that startstoppump doesn't look the same.

There is nothing we can tell you about your code, since we don't know anything about how the switches are physically located, what value you have stored in EEPROM, or what conditions are occurring that should change the pump state.