Guest User

Untitled

a guest
Jun 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. namespace ConsoleApplication4
  2. {
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7.  
  8. int a = 0;
  9. alku:
  10. Console.WriteLine("Username:");
  11. Console.ReadLine();
  12.  
  13. Console.WriteLine("Password:");
  14.  
  15. string passu = Console.ReadLine();
  16.  
  17. if (passu == "homo")
  18. Console.WriteLine("Acces granted");
  19.  
  20. else
  21. {
  22.  
  23. Console.WriteLine("Acces Denied");
  24. a = a + 1;
  25.  
  26. if (a == 3)
  27. {
  28. Console.WriteLine("You have failed too many times, hard drive explodes in 5 seconds.");
  29. }
  30. else
  31. {
  32. goto alku;
  33. }
  34.  
  35. }
  36.  
  37.  
  38. Console.ReadKey();
  39. }
  40. }
  41. }
Add Comment
Please, Sign In to add comment