مثلی برای حل معکوس Reverse کردن آرایه یک بعدی در سی شارپ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Array_2
{
internal class Program
{
static void Main(string[] args)
{
int[] a = new int[10] ;
for (int i = 0 ; i <= 2 ; i++)
{
Console.Write("a [{0}] = ", i) ;
a[i] = Convert.ToInt32(Console.ReadLine()) ;
}
for (int j = 2 ; j >= 0 ; j--)
{
Console.Write("{0}", a[j] , "\n") ;
}
Console.ReadKey();
}
}
}
- ۰۱/۰۶/۱۷