CodePudding user response:
Double [] numArr=new double [] {10, 85, 96, 72, 71, 25};
Int the end=numArr. Length/2;
Double temp=0;
for(int i=0; I{
//exchange
Temp=numArr [numArr. -i Length - 1];
NumArr [numArr. -i Length - 1]=numArr [I];
NumArr [I]=temp;
}
CodePudding user response:
using System;
using System.Linq;
The namespace ConsoleApp2
{
Class Program
{
The static void Main (string [] args)
{
Double [] numArr=new double [] {10, 85, 96, 72, 71, 25};
//reverse
NumArr=numArr. Reverse (). ToArray(a);
//output
NumArr. ToList(). The ForEach (p=& gt; Console. WriteLine (p));
Console.ReadLine();
}
}
}
CodePudding user response: