IF statement

In the following code, the output must be only one because of IF loop but I am getting all the output at once. So please help me

#include <SoftwareSerial.h>
#define txPin  4

//Create a Softspeakjet Objet
SoftwareSerial speakjet = SoftwareSerial(0, txPin);
const int ap0 = A0;  // input pins
const int ap1 = A1;
const int ap2 = A2;
const int ap3 = A3;
const int ap4 = A4;// input pins
const int th2 =340 ;   
const int th4 =200 ;  

char m6[]={20, 96, 21, 114, 22, 88, 23, 5, 183, 7, 159, 146, 164}; //hello
char m1[]={20, 96, 21, 114, 22, 88, 23, 5, 132, 132, 176};  //one
char m2[]={20, 96, 21, 114, 22, 88, 23, 5, 8, 191, 162};  //two
char m3[]={20, 96, 21, 114, 22, 88, 23, 5, 8, 190, 148, 8, 128};  //three
char m4[]={20, 96, 21, 114, 22, 88, 23, 5, 186, 7, 137, 153};  //four
char m5[]={20, 96, 21, 114, 22, 88, 23, 5, 186, 157, 166};  //five
void setup()  
{
  //Configure the pins for the speakjet module
  pinMode(txPin, OUTPUT);
  
  //Set up a speakjet port to talk from Arduino to the speakjet module on pin 3.
  speakjet.begin(9600);    
  
  
}

void loop() {
  int av0 = analogRead(ap0);
  int av1 = analogRead(ap1);
  int av2 = analogRead(ap2);
  int av3 = analogRead(ap3);
  int av4 = analogRead(ap4);
  // put your main code here, to run repeatedly:
  if (((av0 > th2)&&(av1 < th4)&& (av2 > th4)&& (av3 > th4)&& (av4 > th2))== 1 )
  {
    speakjet.println(m1);
    delay(2000);
    exit;
  }
  else if (((av0 > th2)&&(av1 < th4)&& (av2 < th4)&& (av3 > th4)&& (av4 > th2))== 1 )
  {
    speakjet.println(m2);
    delay(2000);
    exit;
  }
  else if (((av0 > th2)&&(av1 < th4)&& (av2 < th4)&& (av3 < th4)&& (av4 > th2))== 1 )
  {
    speakjet.println(m3);   
    delay(2000);
    exit;
  }
  else if (((av0 > th2)&&(av1 < th4)&& (av2 < th4)&& (av3 < th4)&& (av4 < th2))== 1 )
  {
    speakjet.println(m4);   
    delay(2000);
    exit;
  }
  else if (((av0 > th2)&&(av1 > th4)&& (av2 > th4)&& (av3 > th4)&& (av4 > th2))== 1 )
  {
    speakjet.println(m5);   
    delay(2000);
    exit;
  }
  else 
  {
    speakjet.println(m6);   
    delay(2000);
    exit;
  }
  delay(2000);

}

Some debug prints might prove useful.

How does this even compile?

exit should be exit()

vaj4088: How does this even compile?

exit should be exit()

Written without the parens it's just a pointer. Totally useless and does nothing but it is legal.

Delta_G: Written without the parens it's just a pointer. Totally useless and does nothing but it is legal.

When I took C in college, way way back, I remember my teacher saying,

C will not only let you hang yourself, it will cheerfully hand you the rope!

The result of a comparison operator is not an integer, its a truth value, why are you comparing to 1 ?
You can rewrite

  if (((av0 > th2)&&(av1 < th4)&& (av2 > th4)&& (av3 > th4)&& (av4 > th2))== 1 )

as

  if (av0 > th2 && av1 < th4 && av2 > th4 && av3 > th4 && av4 > th2)

which is much clearer and less cluttered without the spurious parentheses and ==1.