Initial Commit
This commit is contained in:
37
C#/QuickSort/QuickSort/Program.cs
Normal file
37
C#/QuickSort/QuickSort/Program.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace QuickSort
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
|
||||
string[] sortstring = null;
|
||||
bool convertsuccess = false;
|
||||
while (convertsuccess == false)
|
||||
{
|
||||
Console.Write("Set of values to sort, separated by spaces: ");
|
||||
|
||||
try
|
||||
{
|
||||
sortstring = Console.ReadLine().Split(' ');
|
||||
break;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
Console.WriteLine("The set of values was not formated correctly");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user