Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace _4.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++)
- {
- products.Add(Console.ReadLine());
- }
- products.Sort();
- for (int i = 0; i < n; i++)
- {
- Console.WriteLine($"{i + 1}.{products[i]}");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment