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 demos
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<string, string> emails = new Dictionary<string, string>();
- bool lol = true;
- do
- {
- string name = Console.ReadLine();
- if (name == "stop") { break; }
- string email = Console.ReadLine();
- emails[name] = email;
- int emailLenght = emails[name].Length;
- if (emails[name][emailLenght - 1] == 's' && emails[name][emailLenght - 2] == 'u' || emails[name][emailLenght - 1] == 'k' && emails[name][emailLenght - 2] == 'u')
- {
- emails.Remove(name);
- }
- }
- while (lol == true);
- foreach (KeyValuePair<string, string> mails in emails) { Console.WriteLine($"{mails.Key} -> {mails.Value}"); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment