/* using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace pacman { class Program { static void Main(string[] args) { } } } */ using System; using System.Threading; namespace ConsolePacman { class Program { static void Main(string[] args) { const string EdibleKeyword = "асель"; //Ключевое слово string pacman = ">0"; while (true) { string input = Console.ReadLine(); if (input.EndsWith(EdibleKeyword)) { for (int i = input.Length - 1; i >= 0; i--) { Thread.Sleep(250); //250мс на каждую букву Console.Clear(); Console.WriteLine(input.Remove(i) + pacman); pacman = pacman == ">0" ? "=0" : ">0"; } Console.Clear(); } } } } }
for (int i = input.Length - 1; i >= 0; i--)