Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace homeWorkExitControl
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- bool doWantToLeave = false;
- string codeWordForExit = "ВЫХОД";
- string userInput;
- while (doWantToLeave == false)
- {
- Console.Write("Введите слово выход, если хотите выйти из программы: ");
- userInput = Console.ReadLine().ToUpper();
- if (userInput == codeWordForExit)
- {
- doWantToLeave = true;
- }
- else
- {
- Console.Clear();
- Console.WriteLine("Ну что опять по новой!");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement