Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Homework2._2
- {
- class Program
- {
- static void Main(string[] args)
- {
- string password = "somesecretkey";
- string userInput = "";
- int countTry = 3;
- while ((userInput != password) && (countTry > 0))
- {
- Console.WriteLine("Введите пароль:");
- userInput = Console.ReadLine();
- countTry -= 1;
- }
- if (userInput == password)
- {
- Console.WriteLine("somesecretmessadge");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement