I think what you mean is:
static int a = 0;
lcd.clear()j;
if (a == 0) {
If you plan to as a bunch of:
if (a == 0) {
}
else if (a == 1) {
}
else if (a == 2) {
}
else if (a == 3) {
}
else if (a == 4) {
}
else {
a = 0;
}
you should probably use a switch/case instead"
switch (a) {
default:
a = 0;
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
}