fork(7) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var np = new [] {1, 2, 4, 7, 0};
  9. var res = np.Zip(np.Skip(1), (a,b)=>b-a).ToArray();
  10. foreach (var n in res) {
  11. Console.WriteLine(n);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.03s 24296KB
stdin
Standard input is empty
stdout
1
2
3
-7