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 CensorYourEMail
- {
- class Program
- {
- static void Main(string[] args)
- {
- string email = Console.ReadLine();
- string text = Console.ReadLine();
- string[] partsOfEmail = email.Split('@');
- string username = partsOfEmail[0];
- string domain = partsOfEmail[1];
- string replacement = new string('*', username.Length) + "@" + domain;
- text=text.Replace(email, replacement);
- Console.WriteLine(text);
- }
- }
- }
Add Comment
Please, Sign In to add comment