Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main()
- {
- if (File.Exists("Input.txt"))
- {
- var InputLines = new List<string>(File.ReadAllLines("Input.txt"));
- for (int numberLine = 0; numberLine < InputLines.Count; numberLine++)
- {
- for (int i = 0; i < InputLines[numberLine].Length; i++)
- if (InputLines[numberLine].Substring(i, 1).Equals("#"))
- {
- InputLines[numberLine] = InputLines[numberLine].Remove(i - 1, 2);
- i = i - 2;
- }
- }
- File.AppendAllLines("Out.txt", InputLines);
- }
- }
- }
- In file: abc#kek###d#
Advertisement
Add Comment
Please, Sign In to add comment