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