Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TextFilter
- {
- static void Main()
- {
- string[] filter = Console.ReadLine().Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
- string text = Console.ReadLine();
- foreach (var word in filter)
- {
- text = text.Replace(word, new string('*', word.Length));
- }
- Console.WriteLine(text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement