Advertisement
TwinFrame

Clight_09_OutputControl

Mar 20th, 2023
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Clight_09
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             string exitWord = "Exit";
  10.             string userInput;
  11.             bool isExit = false;
  12.  
  13.             while (isExit == false)
  14.             {
  15.                 Console.WriteLine($"Для выхода введите: {exitWord}\n");
  16.                 Console.Write("Введите слово: ");
  17.                 userInput = Console.ReadLine();
  18.  
  19.                 if (userInput == exitWord)
  20.                     isExit= true;
  21.  
  22.                 Console.Clear();
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement