Advertisement
fbinnzhivko

Untitled

Jun 5th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. class Program
  5. {
  6.     static void Main()
  7.     {
  8.         List<string> p = Console.ReadLine().Split().ToList();
  9.  
  10.         Dictionary<string, string> phonebook = new Dictionary<string, string>();
  11.  
  12.         while (p[0] != "END")
  13.         {
  14.             p = Console.ReadLine().Split().ToList();
  15.            
  16.             if (p[0] == "A")
  17.             {
  18.                 phonebook.Add(p[1], p[2]);
  19.                
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement