Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace ListOfProducts
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- List<string> products = new List<string>();
- for (int i = 0; i < n; i++)
- {
- string current = Console.ReadLine();
- products.Add(current);
- }
- products.Sort();
- for (int i = 1; i <= products.Count; i++)
- {
- Console.WriteLine($"{i}.{products[i - 1]}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement