Sha256: b01ab83c5343e0a01bb262962fe7a781c543c9ac15a214a5d31124b468867159
Contents?: true
Size: 515 Bytes
Versions: 353
Compression:
Stored size: 515 Bytes
Contents
using System.Linq; public static class Proverb { private static readonly string[] Subjects = { "nail", "shoe", "horse", "rider", "message", "battle", "kingdom" }; public static string Line(int line) { if (line == 7) { return "And all for the want of a horseshoe nail."; } return $"For want of a {Subjects[line - 1]} the {Subjects[line]} was lost."; } public static string AllLines() => string.Join("\n", Enumerable.Range(1, 7).Select(Line)); }
Version data entries
353 entries across 353 versions & 1 rubygems