Guest User

Untitled

a guest
Sep 9th, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. namespace ConsoleApplication3
  2. {
  3.     using System;
  4.     class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             string email = Console.ReadLine();
  9.             string text = Console.ReadLine();
  10.             string censoredMail = new string('*',
  11.                     email.Substring(0, email.IndexOf('@')).Length)  +
  12.                     email.Substring(email.IndexOf('@'));
  13.             Console.WriteLine(text.Replace(email,censoredMail));
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment