
for (x = 0; (x != 7) || (y ==6) || (p<9); x++){ 
    ...
}
