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 _1._4.List_of_Products
- {
- class Program
- {
- static void Main()
- {
- int number = int.Parse(Console.ReadLine());
- List<string> sortedOrders = new List<string>();
- for (int i = 0; i < number; i++)
- {
- string order = Console.ReadLine();
- sortedOrders.Add(order);
- }
- sortedOrders.Sort();
- for (int i = 0; i < sortedOrders.Count; i++)
- {
- Console.WriteLine($"{i + 1}.{sortedOrders[i]}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment