Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ShortBubbleSort
//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
code
I know it's a bit combersome, but it's my first attempt.
Games
AKASH B AND HIS CODES\\
saxasdcdf
Find duplicates in a given integer array
A
Golden Ratio Approximation
Project Euler Problem 8
|= Caching