Advertisement
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 Phonebook
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] phones = Console.ReadLine().Split(' ');
- string[] names = Console.ReadLine().Split(' ');
- string name = string.Empty;
- while (name != "done")
- {
- name = Console.ReadLine();
- for (int i = 0; i < names.Length; i++)
- {
- if (names[i] == name)
- {
- Console.WriteLine($"{names[i]} -> {phones[i]}");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement