public static void Main()
int[] input = { 1, 2, 3, 4, 5 };
int[] result = Reverse(input);
foreach (int b in result)
Console.WriteLine(result);
public static int[] Reverse(int[] input, int start,int end)
for (int i = start, j = end;i < j; i++, j--)
var temporary = input[i];