class Program
{
static void Main(string[] args)
{
string[] zips = { "1600", "1601", "1602","1603","1604","1605","1606","1607","1608","1609","1610"};
double[] prices = { 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10 };
string entryZip;
int x;
bool zipFound = false;
Console.Write("Enter zip code: ");
entryZip = Console.ReadLine();
for( x = 0; x < zips.Length && !zipFound; ++x)
{
if (entryZip == zips[x])
Console.Write("Delivery to {0} ok. ", entryZip);
Console.WriteLine("Delivery charge is {0} ",prices[x].ToString("C"));
zipFound = true;`enter code here`
}
if (!zipFound)
Console.WriteLine("no delivery to {0}. ",entryZip);
Console.ReadKey();
}
}
}
//I cant understand why the zipFound is bool zipFound = false; //anyone can explain it to me thanks :)