fork(1) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. // your code goes here
  9. int[] arr = {1,2,3,4,5};
  10. for (int i = 0; i < arr.Length - 1; i++)
  11. {
  12. Console.WriteLine("i={0}, arr[i]={1}, arr[i+1]={2}", i, arr[i], arr[i + 1]);
  13. }
  14. }
  15. }
Success #stdin #stdout 0.02s 14816KB
stdin
Standard input is empty
stdout
i=0, arr[i]=1, arr[i+1]=2
i=1, arr[i]=2, arr[i+1]=3
i=2, arr[i]=3, arr[i+1]=4
i=3, arr[i]=4, arr[i+1]=5