namespace Activity4
{
class Worksheet4
{
static void Main(string[] args)
{
//I'm limiting the user input to just 5
List<int> Nums = new List<int>();
while (Nums.Count < 5)
{
Console.Write("Enter the 1st number:");
int Nums1 = Convert.ToInt32(Console.ReadLine());
Nums.Add(Nums1);
Console.Write("Enter the 2nd number:");
int Nums2 = Convert.ToInt32(Console.ReadLine());
Nums.Add(Nums2);
Console.Write("Enter the 3rd number:");
int Nums3 = Convert.ToInt32(Console.ReadLine());
Nums.Add(Nums3);
Console.Write("Enter the 4th number:");
int Nums4 = Convert.ToInt32(Console.ReadLine());
Nums.Add(Nums4);
Console.Write("Enter the 5th number:");
int Nums5 = Convert.ToInt32(Console.ReadLine());
Nums.Add(Nums5);
here's the part where I don't really know how I am supposed to sort it in ascending order without using the sort function and if there is a simpler way for me to individually identify each input which one is lower or not please do enlighten me
foreach (int x in Nums)
{
Console.WriteLine(x);
}
}
}
}
}