Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Text;
- class TextFilter
- {
- static void Main()
- {
- string[] word = Console.ReadLine().Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
- StringBuilder text = new StringBuilder(Console.ReadLine());
- string[] result = new string[word.Count()];
- for (int i = 0; i < word.Count(); i++)
- {
- result[i] = new string('*', word[i].Length);
- text.Replace(word[i], result[i]);
- }
- Console.WriteLine(text);
- }
- }
Add Comment
Please, Sign In to add comment