Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Reverse Array
using System; public class Program { public static void PrintArray(int[] arr) { for(int i = 0; i<arr.Length; i++) { Console.WriteLine(arr[i]); } } static void ReverseArray(int[] arr) { for(int i = 0 ; i<arr.Length/2; i++) { int temp = arr[i]; arr[i]=arr[arr.Length - i - 1]; arr[arr.Length - i - 1]=temp; } } public static void Main() { int[] arr = {1,2,4,6,7,11}; PrintArray(arr); ReverseArray(arr); Console.WriteLine("-----Reverse Array-------"); PrintArray(arr); } }
run
|
edit
|
history
|
help
0
Intuit // C# // listing_4.6 (Shooting on the target)
min tree
Hex character codes
Ejercicio bucles
asxsdf
Get Round of 5 c# Vishal
Enumerate an enum?
a6
fnaf
Card Shuffling