Im assuming you dont know what arrays are and im assuming in variable containers you store your shipment , this is a simple code for beginners(sorry for bad format)
int hugeCounter = 0, //counters that count how many countainers were used
largeCounter = 0,
mediumCounter = 0,
smallCounter = 0;
while(containers != 0) //loop till there is nothing in container
{
if(containers >= 50) // if its larger than a huge container then
{
containers -= 50; //substract from containers
hugeCounter++; //gratz you filled 1 huge container
}
if(containers >= 20)
{
containers -= 20;
largeCounter++;
}
if(containers >= medium)
{
containers -= 5;
mediumCounter++;
}
if(containers >= small)
{
containers -= 1;
smallCounter++;
}
}
now you just have to display your containers counters