Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
bubbleSort
//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 = {3, 2, 5, 1, 7, 22}; int temp; for ( int i = 0; i < array.Length; i++) { for ( int j = 0; j < array.Length -1; j++) if( array[j] > array[j+1]) { temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } for ( int i = 0; i < array.Length; i++) {Console.Write(array[i] + ", "); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Namespace basic
Polygon Util
Case where use of default constructor ( this() ) is mandatory
Diagonal Difference
Expression Tree - Demo2
Public access specifier
Homework1
(Sort)Rounding Magic - C#
shorten file paths in a commandline using regex
Constructor inheriterance
Please log in to post a comment.