Permalink
Browse files

Four4Sample - support any digit 1-9

  • Loading branch information...
bobbymcr committed Mar 17, 2018
1 parent 45d07d6 commit f1d1c0a4db7c90a50e563a42439d0c564cb457e6
Showing with 3 additions and 6 deletions.
  1. +3 −6 projects/Four4Sample/Four4/Program.cs
@@ -16,7 +16,7 @@ private static void Main(string[] args)
int d = GetDigit(args);
ExpressionSearch search = InitSearch(d);
Results results = new Results();
Results results = new Results { NumeralCount = d };
search.Run(e => OnFound(results, e));
stopwatch.Stop();
@@ -35,12 +35,9 @@ private static int GetDigit(string[] args)
if ((args.Length != 0) && (args[0].Length > 0))
{
char c = args[0][0];
switch (c)
if (c > '0' && c <= '9')
{
case '3':
case '4':
d = c - '0';
break;
d = c - '0';
}
}

0 comments on commit f1d1c0a

Please sign in to comment.