fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int[] ar = new int[5];
  8. ar[0] = 6;
  9. ar[1] = 7;
  10. ar[2] = 8;
  11. ar[3] = 9;
  12. ar[4] = 0;
  13. int oldLast = ar[ar.Length - 1];
  14. for (int i = ar.Length - 1; i >= 0; i--)
  15. ar[i] = i == 0 ? oldLast : ar[i - 1];
  16. foreach(int i in ar)
  17. Console.WriteLine(i);
  18. }
  19. }
Success #stdin #stdout 0.02s 33912KB
stdin
Standard input is empty
stdout
0
6
7
8
9