Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - using System;
 - namespace Homework2_8
 - {
 - internal class Program
 - {
 - static void Main(string[] args)
 - {
 - string password = "123";
 - string userInputPassword;
 - int maxAttempts = 3;
 - for (int i = 0; i < maxAttempts; i++)
 - {
 - Console.Write("Введите пароль: ");
 - userInputPassword = Console.ReadLine();
 - if (userInputPassword == password)
 - {
 - Console.WriteLine("Секретное Сообщение.");
 - i = maxAttempts;
 - }
 - else
 - {
 - Console.WriteLine("Пaроль не верный");
 - }
 - }
 - }
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment