After the user has entered the region validate that all values are greater than 0. If they are subtract one from them and process the data just like you are now.
if(a < 1) a = 1;
if(quantity < 1) quantity = 1;
// Subtract 1 from the values
a--;
quantity--;
if (quantity > 6)
{b = 5;}
else
{b = quantity;}
cout<<"The price of shipping comes out to: "<<region[a][b] + shipping<<" Since $20 is added for the shipping cost"<<endl;
1
solved Starting Code from 1 instead of 0? [closed]