Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Selection sort
//Computer selection sort 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[] ar={5,3,7,2,9,1,0,4,8,6}; int n=ar.Length; for(int x=0; x<n; x++) { int min_index=x; for(int y=x; y<n; y++) { if(ar[min_index]>ar[y]) { min_index=y; } } int temp=ar[x]; ar[x]=ar[min_index]; ar[min_index]=temp; } Console.WriteLine("Sort array in ascending order by using Selection Sort"); foreach(int i in ar) { Console.Write(i+", "); } } } }
run
|
edit
|
history
|
help
0
eze
Finding a Substring in a Main String
346625
Palindrome Number
er
Enum, TryParse, cast to enum
проект из 7 главы
NumberSeenSample
Vídeo01 - Main
Problem_fb_series