Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Login1
- {
- public static void Main()
- {
- string username, password;
- int ctr = 0;
- Console.Write("\n\nCheck username and password :\n");
- Console.Write("N.B. : Default username and password is : username and password\n");
- Console.Write("---------------------------------\n");
- do
- {
- Console.Write("Input a username: ");
- username = Console.ReadLine();
- Console.Write("Input a password: ");
- password = Console.ReadLine();
- ctr++;
- }
- while (( username != "username" && password != "password" )
- && (ctr != 3));
- if (ctr == 3)
- Console.Write("\nLogin attempt more than three times. Try later!\n\n");
- else
- Console.Write("\nPassword entered successfull!\n\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement