static void Main(string[] args)
{
int[] arr = { -2,5,-6,9,3,7};
Wz(arr);
}
public static void Wz(int[] arr) {
for (int i = 0; i < arr.Length/2; i++)
{
int arrs = arr[i];
arr[i] = arr[arr.Length - i - 1];
arr[arr.Length - i - 1] = arrs;
}
for (int i = 0; i < arr.Length; i++)
{
Console.Write(arr[i]+"\t");
}
Console.ReadKey();
}
输出: 7 3 9 -6 5 -2