Your use of for loops is unconventional, to say the least. You should remove the line that declares all the index variables. They should be declared and initialized in the for statements.
for(int a=0; a<2; a++)
{
}
Declaring the variables in one place, using them in another, and (re)initializing them in a third place is error-prone. Declare, initialize, and use them all in one place.
What mux shield? What are you trying to multiplex? Not the LCD pins, surely. Nothing in that code requires a multiplexer.
i will put the pin of my lcd in mux shield cause i have many sensor to be used for my smart window project thats why i bought mux shield..so how will i change my code when i put the 6pin of my lcd into Mo or on the FIRST multiplexer.