Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Swap adjacent Elements
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) 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[] arr = {1,2,3,4,5}; int i =0; while (i < arr.Length - 1) { var temp = arr[i]; arr[i] = arr[i+1]; arr[i+1] = temp; i = i +2; } foreach(var a in arr) { Console.WriteLine(a); } } } }
run
|
edit
|
history
|
help
1
test2
asdfrtgeryrutu
see all nodes in given ldap node
Palindrome 1
Convert String to integer in c#
sdfghnjmkuyhtgrfed
First Test With Coder - 3 digit number into digits
give coins
Hehd
RankingNumeric