fork(1) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var query = Enumerable.Range(2, 10)
  9. .Select(c => new { Length = 2 * c, Height = c * c - 1, Hypotenuse = c * c + 1 })
  10. .Select(x => string.Format("{0,4}{1,4}{2,4}", x.Height, x.Hypotenuse, x.Length));
  11.  
  12. foreach (var x in query)
  13. Console.WriteLine(x);
  14. }
  15. }
Success #stdin #stdout 0.04s 24256KB
stdin
Standard input is empty
stdout
   3   5   4
   8  10   6
  15  17   8
  24  26  10
  35  37  12
  48  50  14
  63  65  16
  80  82  18
  99 101  20
 120 122  22