It's usually an error to start i at 1, in C.


for(i=0;i<MAX;i++) {
if(i>=BadNumber)
break;
array[i] = (2x + y ) * 2; //normal processing
printf("\nThis is loop number %3d", i+1);...