Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _2._8
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Введите пароль");
- string password = Console.ReadLine();
- int countPassword = 0;
- while (countPassword < 5)
- {
- Console.WriteLine("Введите пароль еще раз");
- string checkPassword = Console.ReadLine();
- if (password == checkPassword)
- {
- Console.WriteLine("Супер секрет");
- break;
- }
- else
- {
- if (countPassword < 4)
- {
- Console.WriteLine("Пароль введен не верно, попробуйте еще раз");
- countPassword++;
- }
- else
- {
- countPassword++;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement