It display the list not even in Order

void Sort(string LIST[],string TYPE[],int n)

{

string tmp;

char TEMP[2000][200];

string TEMP2[2000];

for (int i = 0 ; i < n ; i++)

{

strcpy(TEMP[i],LIST[i].c_s

int j = 0;

do

{

if(TEMP[i][j] >= 97 && TEMP[i][j] <= 122 )

TEMP[i][j] -= 32;

j++;

}while(TEMP[i][j]!=0);

TEMP2[i] = TEMP[i];

}

for (int i = 0 ; i < n ; i++)

//This is for Debugging Purposes

cout << TEMP2[i] << " " << TEMP[i]<< LIST[i] << endl;

for (int i=0; i<n-1; i++) {

for (int j=0; j<n-1-i; j++){

//this is to be able to find repeated words since , I dont want repetition

if (LIST[j+1] == LIST[j]){

LIST[j] = "";

TYPE[j] = "";

}//End of IF

else if (TEMP2[j+1] < TEMP2[j]) { /* compare the two neighbors */

tmp = LIST[j]; /* swap a[j] and a[j+1] */

LIST[j] = LIST[j+1];

LIST[j+1] = tmp;

tmp = TYPE[j]; /* swap a[j] and a[j+1] */

TYPE[j] = TYPE[j+1];

TYPE[j+1] = tmp;

}//End Of ElseIF

}//End of Inner For Loop

}//End of Outer For Loop

}//End Of Sort Function