serial print problem,somebody please help

Hai dudes ,
I wrote a program for my quardcopter but i have some problem in it,The concept of my code is if pin0 detect 5v means it will print “FORW;”.If same pin detect 3.3v means it will print “BACK;”.Again if the same pin detect any other voltge value instead of 5v and 3.3v means it will print “N;”.But i have tried to print “N;”,it is not printing.
Could anybody help me please

void setup()
{
  Serial.begin(9600);
  pinMode(0, INPUT);
  pinMode(1, INPUT);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
}
void loop() {
  int B1v = analogRead(0);
  int B2v = analogRead(1);
  int B3v = analogRead(2);
  int P1v = analogRead(3);
  int P2v = analogRead(4);
  float direc = (B1v * (5.0 / 1023.0));
  float steer = (B2v * (5.0 / 1023.0));
  float slide = (B3v * (5.0 / 1023.0));
  float hight = (P1v * (5.0 / 1023.0));
  float accel = (P2v * (5.0 / 1023.0));
  if (direc == 5.0)
  {
    Serial.print("FORW;");
  }
  else if (direc > 3.27 < 3.31)
  {
    Serial.print("BACK;");
  }
  else if (direc != 3.29 != 3.30 != 5.0)
  {
    Serial.print("N;");
  }
  if (steer == 5.0)
  {
    Serial.print("RIGHT;");
  }
  else if (steer >= 3.28 <= 3.30)
  {
    Serial.print("LEFT;");
  }
  else if (steer != 3.29 != 3.30 != 5.0)
  {
    Serial.print("C;");
  }
  if (slide == 5.0)
  {
    Serial.print("SR;");
  }
  else if  (slide >= 3.28 <= 3.30)
  {
    Serial.print("SL;");
  }
  else if (slide != 3.29 != 3.30 != 5.0)
  {
    Serial.print("ST;");
  }
  {
    Serial.print(hight);
    Serial.println(accel);
  }
  {
    Serial.flush();
  }
}

Hello,

Most of your if statements are incorrect, for example this:

if (direc > 3.27 < 3.31)

should be this:

if (direc > 3.27 && direc < 3.31)

Also, it is very improbable that your values will be exactly equal to 5.0 or 3.30. You should check a range too in these cases.

Have a look at the warnings the sketch produces

sketch_oct02a.ino: In function 'void loop()':
sketch_oct02a.ino:26:18: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
sketch_oct02a.ino:30:18: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
sketch_oct02a.ino:30:34: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
sketch_oct02a.ino:38:18: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
sketch_oct02a.ino:42:18: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
sketch_oct02a.ino:42:34: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
sketch_oct02a.ino:50:19: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
sketch_oct02a.ino:54:18: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
sketch_oct02a.ino:54:34: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]

You should not compare float variables with '==',
rounding and limitations in the representation make results very counterintuitive.
Instead if (myFloat == 3.4) use something like if (abs(myFloat-3.4) < 0.001).
(Values 0 and NaN can be compared with ==)
The way you try to test ranges does not work with any type, it does not what you want (see warnings).

  pinMode(0, INPUT);
  pinMode(1, INPUT);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);

The pinMode() function affects the digital pins. Analog pins are read-only.

F**king with the hardware serial pins is NOT a good idea, when using them for their hardware serial purposes.

What you meant to write is something like:

void setup() {
  Serial.begin(9600);
}
void loop() {
  int B1v = analogRead(A0);
  float direc = (B1v * (5.0 / 1023.0));  // Convert to volts

  if (direc > 4.5) {  // 5V  (4.5V or higher)
    Serial.print("FORW;");
  }
  else if (direc > 3.0) { // 3.3V  (3.0V to 4.5V)
    Serial.print("BACK;");
  }
  else { // <3.0V
    Serial.print("N;");
  }
}

Slight correction. This should be a comment I think.

 else {  // <3.0V
    Serial.print("N;");
  }

Delta_G:
Slight correction. This should be a comment I think.

 else {  // <3.0V

Serial.print("N;");
 }

Oops! Correct. I forgot the slashes.
I've fixed it in the post.