Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class SortArrayOfNumbers
- {
- static void Main()
- {
- Console.WriteLine("Enter n: ");
- int n = int.Parse(Console.ReadLine());
- int[] sequence = new int[n];
- Console.WriteLine("Now, enter \"n\" numbers to see the sort numbers: ");
- for (int i = 0; i < sequence.Length; i++)
- {
- Console.Write("{0} number is: ", i+1);
- sequence[i] = int.Parse(Console.ReadLine());
- }
- Console.WriteLine();
- Console.WriteLine("Sort numbers are: ");
- for (int i = 0; i <sequence.Length; i++)
- {
- Array.Sort(sequence);
- Console.Write(sequence[i] + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement