Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bubble Sort
//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[] a = { 3, 2, 5, 4, 1 }; int t; Console.WriteLine("The Array is : "); for (int i = 0; i < a.Length; i++) { Console.WriteLine(a[i]); } for (int j = 0; j <= a.Length - 2; j++) { for (int i = 0; i <= a.Length - 2; i++) { if (a[i] > a[i + 1]) { t = a[i + 1]; a[i + 1] = a[i]; a[i] = t; } } } Console.WriteLine("The Sorted Array :"); foreach (int aray in a) Console.Write(aray + " "); } } }
run
|
edit
|
history
|
help
0
gfhfgsdfsfdsdghgfddfg
arrays bidimencionales y tridimencionales
C# Abstract Syntax Tree Example: Compiler for a numeric expression
Command line arguments parser (Lightweight, robust, flexible)
Exception handling2
pyramidnos
lala
changeMe
ColoredTriangleVaoOpenTK4OpenGL31 (Added shaders to Program.cs)
Array Foreach with sum