In that case, the loop will never iterate even once.

If you want to do this round robin, I think you want something more like


if (proc[i].qaunta > 0 ) proc[i].qaunta -= 1;

in place of...