Triplet of three numbers: Difference between revisions

Content added Content deleted
(Added C# version, showing some higher limits.)
m (→‎{{header|C#|CSharp}}: sized output section, posed a question.)
Line 268: Line 268:


=={{header|C#|CSharp}}==
=={{header|C#|CSharp}}==
How about some upper limits above 6000?
<lang csharp>using System; using System.Collections.Generic; using System.Linq;
<lang csharp>using System; using System.Collections.Generic; using System.Linq;
using T3 = System.Tuple<int, int, int>; using static System.Console;
using T3 = System.Tuple<int, int, int>; using static System.Console;
Line 291: Line 292:
if (isPrT(lllj, lj, j)) yield return new T3(lllj, lj, j); } }</lang>
if (isPrT(lllj, lj, j)) yield return new T3(lllj, lj, j); } }</lang>
{{out}}
{{out}}
<pre> "N": Prime Triplet Adjacent (to previous)
<pre style='height:50ex'> "N": Prime Triplet Adjacent (to previous)
---- ----------------- -----------------------
---- ----------------- -----------------------
8: (7, 11, 13)
8: (7, 11, 13)