Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int index = 1;
- int inputNumber = int.Parse(Console.ReadLine());
- int[] array = new int[n];
- array[0] = inputNumber;
- while (index < n)
- {
- inputNumber = int.Parse(Console.ReadLine());
- array[index] = inputNumber;
- index++;
- }
- Array.Sort<int>(array);
- foreach (var item in array)
- {
- Console.WriteLine(item);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment