Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
insertion 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) { //Your code goes here Console.WriteLine("Hello, world!"); int j = 0; int temp = 0; int[] arr = new int[6]; arr[0] = 2; arr[1] = 0; arr[2] = 1; arr[3] = 8; arr[4] = 7; arr[5] = 3; for(int i = 0; i < arr.Length-1; i++) { j = i + 1; while(j > 0) { if(arr[j-1] > arr[j]) { temp = arr[j]; arr[j] = arr[j-1]; arr[j-1] = temp; } j--; } } for(int i = 0; i < arr.Length; i++) { Console.WriteLine(arr[i] + " "); } } } }
run
|
edit
|
history
|
help
0
Task 1_3
Unity Character Controller Version 2
1
Problem: binary
Сортировка массива
xml into dictionary
hi
Parse SQL Insert
s
Date Conversion