int item_number = 0;

for (i = 0; i < max_items; i ++)
{         
  if (from <= items[i].level < to) item_number = i; break;                     /*  "unconditional break" */
}                                                   