Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- string password = "1337Bruh228";
- string secretMessage = "Secret message without swearing.";
- int tryCount = 3;
- string input = "";
- for (int i = 0; i < tryCount; ++i)
- {
- Console.WriteLine("Please input a password : ");
- input = Console.ReadLine();
- if (input.Equals(password))
- {
- Console.WriteLine("Your secret message is : " + secretMessage);
- i = tryCount;
- }
- else if (i + 1 == tryCount)
- {
- Console.WriteLine("Count of error tries is out of limit.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment