Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,33 @@
using System;
using System.Linq;
namespace CommaQuibbling
{
internal static class Program
{
#region Static Members
private static string Quibble(string[] input)
{
return
String.Format("{{{0}}}",
String.Join("",
input.Reverse().Zip(
new [] { "", " and " }.Concat(Enumerable.Repeat(", ", int.MaxValue)),
(x, y) => x + y).Reverse()));
}
private static void Main()
{
Console.WriteLine( Quibble( new string[] {} ) );
Console.WriteLine( Quibble( new[] {"ABC"} ) );
Console.WriteLine( Quibble( new[] {"ABC", "DEF"} ) );
Console.WriteLine( Quibble( new[] {"ABC", "DEF", "G", "H"} ) );
Console.WriteLine( "< Press Any Key >" );
Console.ReadKey();
}
#endregion
}
}