Advertisement
Rodunskiy

Untitled

May 5th, 2024
727
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSLight
  4. {
  5.     public class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string word;
  10.             bool isExit = true;
  11.  
  12.             while (isExit)
  13.             {
  14.                 Console.WriteLine("Введите любое слово:\nЕсли хотите закончить ввод слов напишите exit");
  15.                 word = Console.ReadLine();
  16.  
  17.                 if (word == "exit")
  18.                 {
  19.                     isExit = false;
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement