Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace registrationAndLogin
- {
- class Program
- {
- static void Main(string[] args)
- {
- string username = ""; // niet slecht om uw variable al te assignen aan iets leeg
- string password = ""; // niet slecht om uw variable al te assignen aan iets leeg
- int loginCount = 0; // zoals je hier wel deed = 0
- Console.WriteLine("Welcome to the login system");
- Console.WriteLine("Please commence by entering your username");
- username = Console.ReadLine(); // hier je input aan je username toekennen
- if (username == "abcd")
- {
- Console.WriteLine("Now enter your password");
- loginCount = 0;
- Console.ReadLine();
- }
- else
- {
- loginCount ++;
- Console.Write("Wrong username, ",3-loginCount," attemps remaining");
- Console.ReadKey();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement