Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace ConsoleApplication1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. const string a = "login";
  15. const string b = "kard";
  16. const string c = "inal";
  17. const string d = "exit";
  18. int i = "1";
  19. if (File.Exists("C:\\text.txt"))
  20. {
  21. StreamReader file = new StreamReader("C:\\text.txt");
  22. Console.WriteLine(file.ReadLine());
  23. string e = Console.ReadLine();
  24. if (e == a)
  25. {
  26. link1:
  27. Console.WriteLine("введите лог");
  28. string v = Console.ReadLine();
  29. if (b == v)
  30. {
  31. Console.WriteLine("введите пасс");
  32. while (i<4)
  33. {
  34. i++;
  35. Console.ReadKey(true);
  36. }
  37. string f = Console.ReadLine();
  38. if (f == c)
  39. {
  40. Console.WriteLine("authorised!");
  41. }
  42. else
  43. {
  44. Console.WriteLine("error!");
  45. goto link1;
  46. }
  47. }
  48. else
  49. {
  50. Console.WriteLine("error!");
  51. goto link1;
  52. }
  53. }
  54. }
  55. else
  56. Console.WriteLine("Файл не существует");
  57. Console.ReadKey();
  58. }
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement