Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class ForbiddenWords
- {
- public static void Main()
- {
- string textInput = Console.ReadLine();
- string[] forbidenWords = "PHP, CLR, Microsoft".Split(',');
- for (int i = 0; i < forbidenWords.Length; i++)
- {
- forbidenWords[i] = forbidenWords[i].Trim();
- textInput = textInput.Replace(forbidenWords[i], new string('*', forbidenWords[i].Length));
- }
- Console.WriteLine(textInput);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement