Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@erikdietrich
Created March 18, 2013 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikdietrich/5184418 to your computer and use it in GitHub Desktop.
Save erikdietrich/5184418 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
var factory = new MailPieceFactory();
var zipCodes = new List<int>();
for (int index = 0; index < 23458333; index++)
{
zipCodes.Add(index % 100000);
var randomPiece = factory.GetPiece(GetRandomKey());
string pieceStatistics = randomPiece.GetStatistics(zipCodes[index]);
Console.Write(pieceStatistics);
}
Console.ReadLine();
}
private static char GetRandomKey()
{
return new Random().Next() % 2 == 0 ? 'P' : 'L';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment