Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Selection 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[] A= new int[]{2,7,4,1,5,3}; for (int i=0 ; i < A.Length -1; i++) { int min=i; for(int j= i+1; j < A.Length; j++) { if (A[j] < A[min]) min = j; } int temp=A[i]; A[i]=A[min]; A[min]=temp; } for(int k=0; k < A.Length; k++) { Console.WriteLine(A[k]); } } } }
run
|
edit
|
history
|
help
0
How do I calculate someone's age in C#?
Test
45
Unity Character Controller Version 2
Decorator Design Pattern
Student Cables
Informashin prsonely
Math 10.0 (Added no repeat random numbers)
Overloading
HashItUp