Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Get Bytecent Price in $USD
15
P.I. Works
bro
sortowania przez wstawienie
hay
My wall
INTUIT: Laba#2; Данные для графика изменяняющейся функции
DateTime With TimeZone to UTC DateTime
CallBy Val Vs Ref Double
stackse - search stackoverflow differently
Please log in to post a comment.