Last active
May 16, 2023 15:53
-
-
Save Strelok78/147229b3933a36e66dd68bc58a9f11b5 to your computer and use it in GitHub Desktop.
Executing until the "exit" is entered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MyCode | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string exitText = "exit"; | |
bool isWorking = true; | |
while (isWorking == true) | |
{ | |
Console.WriteLine("cicle is working"); | |
if (exitText == Console.ReadLine()) | |
{ | |
isWorking = false; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment