Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ReverseArrayC#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] array = { 1, 2, 3, 4, 5 }; ReverseArray(ref array); foreach (int i in array) Console.Write(i.ToString() + " "); } public static void ReverseArray(ref int[] array) { int size = array.Length; for (int i = 0; i < size/2; ++i) { int temp = array[i]; array[i] = array[size-i-1]; array[size-i-1] = temp; } } } }
run
|
edit
|
history
|
help
0
linq test
otro
asifuesire
swap using xor
linqs
Fórum ➡ GroupJoin'ing Books and Orders ( with Zip'ped output ) ♦
масиви част2
Volatile madness
AdventCode
Tarkov Time