Modifications in function

Hello there !
In the following sketch, I was using three reed switches and only one magnetic float(when the magnetic float was traveling upwards and downwards, it was making and breaking the reed switches) , now I want to use three separate magnetic float switches (each switch will have its own reed switch and magnetic float)

What modifications, I need to do in the functions in this sketch?

Thanks

#include <EEPROM.h>

// INPUT PINS
#define Buttonpin1  2  //Tank Level1
#define Buttonpin2  3  //Tank Level2
#define Buttonpin3  4  //Tank Level3
#define Auto_Man_Buttonpin   5 //Auto/manual button

// OUTPUT PINS
#define LED1  8 //Tank1 Level1 Display
#define LED2  9 //Tank1 Level2 Display
#define LED3  10 //Tank2 Level1 Display
#define Auto_Man_Led  6  //Auto/manual operation
#define Pumppin 7 // Pin for water pump activation

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

// variables
int state=0;
int level = 0;
int lastlevel = 0;
void setup (){

// INPUTS
pinMode(Auto_Man_Buttonpin,INPUT);  // default mode is INPUT
pinMode(Buttonpin1,INPUT);               // default mode is INPUT
pinMode(Buttonpin2,INPUT);               // default mode is INPUT
pinMode(Buttonpin3,INPUT);               // default mode is INPUT
digitalWrite(Auto_Man_Button, HIGH);  // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(Buttonpin1, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(Buttonpin2, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
digitalWrite(Buttonpin3, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH

// OUTPUTS
pinMode(Pumppin, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(Auto_Man_Led, OUTPUT);
pinMode(LED3, 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();
}

// FUNCTION THAT SETS THE LEDS ACCORDING TO LEVEL VARIABLE WHENEVER CALLED
void setleds() 
{

 digitalWrite(LED1, LOW );
 digitalWrite(LED2, LOW );
 digitalWrite(LED3, LOW );
 if (level > 0)   digitalWrite(LED1, HIGH );
 if (level > 1)   digitalWrite(LED2, HIGH );
 if (level > 2)   digitalWrite(LED3, HIGH );
}

// FUNCTION THAT CONTROLS THE PUMP OPERATION ACCORDING TO WATER LEVEL AND AUTO_MAN SETTING


  void  startstoppump(){ 
  if (level < 3)   digitalWrite(Pumppin, HIGH );
  if ((level == 3) & (state == 0)) 
{
  digitalWrite(Pumppin, LOW );
}
else 
{
digitalWrite(Pumppin, HIGH );
}
 }

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

// MAIN LOOP
void loop () 
{

// TOGGLE AUTO/MANUAL MODE
  if ( (digitalRead(Auto_Man_Buttonpin) == LOW) & (state == 0) ) 
{                                                            // Button  pushed
state=1;  
digitalWrite(Auto_Man_Led, state );            // Turn on the LED
startstoppump();
delay(400);
}
  if ( (digitalRead(Auto_Man_Buttonpin) == LOW) & (state == 1)  ) 
{                                                           // Button  pushed
  state=0;  
  digitalWrite(Auto_Man_Led, state );        // Turn off the LED
   startstoppump();
  delay(400);
} 

//END OF TOGGLE AUTO/MANUAL MODE
 
// CHECK WATER LEVEL
if ( digitalRead(Buttonpin1) == LOW  ) 
{                              // Button  pushed
level = 1;
 }
 if ( digitalRead(Buttonpin2) == LOW  ) 
{                               // Button  pushed
 level = 2;
}
 if ( digitalRead(Buttonpin3) == LOW  ) 
{                              // Button  pushed
level = 3;
}
//END OF CHECK WATER LEVEL

 //  IF WATER LEVEL CHANGED AND CALL THE NECESSARY FUNCTIONS.
 if (level != lastlevel) 
{
 setleds();
 startstoppump();
 updateprom();
 }   
  } // END OF MAIN LOOP

What modifications, I need to do in the functions in this sketch?

First
thing
you
need
to
do
is
use
Tools
+
Auto
Format
to
make
the
code
readable.

define Buttonpin1  2  //Tank Level1
#define Buttonpin2  3  //Tank Level2
#define Buttonpin3  4  //Tank Level3
#define Auto_Man_Buttonpin   5 //Auto/manual button

// OUTPUT PINS
#define LED1  8 //Tank1 Level1 Display
#define LED2  9 //Tank1 Level2 Display
#define LED3  10 //Tank2 Level1 Display
#define Auto_Man_Led  6  //Auto/manual operation
#define Pumppin 7 // Pin for water pump activation

If an input is a tank-level input, why not call it that?
If an LED indicates a tank-level, why not call it that?

Thanks for the tips
I am Sorry for the mess up, here is new format compiled code.

#include <EEPROM.h>
// CONSTANTS
// INPUT PINS
#define Level1  3  
#define Level2  4  
#define Level3  5  

// OUTPUT PINS
#define LEDLevel1  8 
#define LEDLevel2  9 
#define LEDLevel3  11 
#define Pumppin  13 
// EEPROM MEMORY POSITIONS
#define memposL1  0  // set constant eeprom position 0 to save Level1
// variables
int state= 0;
int level = 0;
int lastlevel = 0;
void setup ()
{
  // INPUTS

  pinMode(Level1,INPUT);   // default mode is INPUT
  pinMode(Level2,INPUT);   // default mode is INPUT
  pinMode(Level3,INPUT);   // default mode is INPUT

  digitalWrite(Level1, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
  digitalWrite(Level2, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
  digitalWrite(Level3, HIGH);     // Turn on the internal pull-up resistor, default state is HIGH
  // OUTPUTS
  pinMode(Pumppin, OUTPUT);
  pinMode(LEDLevel1,    OUTPUT);
  pinMode(LEDLevel2,    OUTPUT);
  pinMode(LEDLevel3,    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();
}
// FUNCTION THAT SETS THE LEDS ACCORDING TO LEVEL VARIABLE WHENEVER CALLED
void setleds() 
{

  digitalWrite(LEDLevel1, LOW );
  digitalWrite(LEDLevel2, LOW );
  digitalWrite(LEDLevel3, LOW );
  if (level > 0)   digitalWrite(LEDLevel1, HIGH );
  if (level > 1)   digitalWrite(LEDLevel2, HIGH );
  if (level > 2)   digitalWrite(LEDLevel3, HIGH );
}
//FUNCTION THAT CONTROL THE START AND TOP OF THE PUMP
void  startstoppump()
{ 
  if (level == 1)   
  {
    digitalWrite(Pumppin, HIGH );
  }
  if ((level == 3) & (state == 0)) 
  {
    digitalWrite(Pumppin, LOW );
  }
}
// FUNCTION THAT UPDATES EEPROM AT EACH LEVEL CHANGE
void updateprom() 
{
  lastlevel = level;                           // update lastLevel variable
  EEPROM.write(memposL1, level);   // and store new Level value to eeprom
}
// MAIN LOOP
void loop () 
{
  // CHECK WATER LEVEL
  if ( digitalRead(Level1) == LOW  ) 
  { 
    level = 1;
  }
  if ( digitalRead(Level2) == LOW  )
  { 
    level = 2;
  }
  if ( digitalRead(Level3) == LOW  ) 
  { 
    level = 3;
  }
  //END OF CHECK WATER LEVEL
  //  IF WATER LEVEL CHANGED AND CALL THE NECESSARY FUNCTIONS.
  if (level != lastlevel) 
  {
    setleds();
    startstoppump();
    updateprom();
  }   
} // END OF MAIN LOOP
  if ((level == 3) & (state == 0))

Should that be && in the middle? I can't see how a bitwise and is useful.

In your code, I can't see that changing the mechanism for triggering the switch will make any difference. The switches are still HIGH or LOW, regardless of what caused them to be HIGH or LOW.

I can't see how a bitwise and is useful.

in this particular case it should work as well as logical AND, but I agree it should &&

More to the point, why are you testing state at all - you never change it.

What's the purpose of the change to three float switches?

Thanks Mr. PaulS,
You are right, I will change it to &&.

What's the purpose of the change to three float switches?

Thanks Mr. Wildbill
This one float system sometime mal-functions. Another problem is that if the water falls below the
Minimum i.e. level1 the indicator ledLevel1 remains ON. What is the solution to this problem ?