Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp8.ExitController
- {
- class Program
- {
- static void Main(string[] args)
- {
- int count = 0;
- int countLevelUp = 10000;
- string attack = "attack";
- string exit = "exit";
- string userInput;
- Console.WriteLine("Сегодня у вас будет тренировка по вводу. Введите attack 10 000 раз, что бы увеличить навык ввода. Для выхода введите exit.");
- while (count < countLevelUp)
- {
- userInput = Console.ReadLine();
- if (userInput == attack)
- {
- Console.WriteLine("Вы ввели attack, счётчик повысился на 1.");
- }
- else if (userInput == exit)
- {
- Console.WriteLine("Сожалеем, что вы сдались, до свидания.");
- break;
- }
- else
- {
- Console.WriteLine("Введите корректно.");
- }
- Console.ReadKey();
- Console.Clear();
- }
- if (count >= countLevelUp)
- {
- Console.WriteLine("Вы справились, вы сумасшедший!!!");
- }
- Console.WriteLine("Нажмите любую клавишу, что бы выйти.");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement