-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
40 lines (35 loc) · 1.15 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace sortingAlgorithmsAnalyse
{
class Program
{
static void choosing()
{
Console.WriteLine("enter array size between 10 and 10000");
int sizeOfArray = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("choose your method: \n0-insertion sort\n1-selection sort");
int choose = Convert.ToInt32(Console.ReadLine());
switch (choose)
{
case 0:
insertionSort insertion = new insertionSort();
insertion.randomArray(sizeOfArray);
insertion.insertionSortMethod(sizeOfArray);
break;
case 1:
SelectionSort selection = new SelectionSort();
selection.randomArray(sizeOfArray);
selection.selectionSortMethod(sizeOfArray);
break;
default:
Console.WriteLine("bug!");
break;
}
Console.Read();
}
static void Main(string[] args)
{
choosing();
}
}
}