Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _2._8
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите пароль ");
- string password = Console.ReadLine();
- Console.Write("Проверка введенного пароль ");
- string password_Save = Console.ReadLine();
- byte i =5 ;
- while(i>=0)
- {
- if (password == password_Save)
- {
- Console.WriteLine("Вы ввели правильный пароль , секретное слово Троллейбус ");
- Console.ReadLine();
- break;
- }
- else
- {
- if (i == 0)
- break;
- Console.Write("Введен неправильный пароль у вас осталось "+i+" попыток ");
- Console.WriteLine("попробуйте ввести еще ");
- password_Save = Console.ReadLine();
- i--;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement