Advertisement
lolblach333

Untitled

Apr 12th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 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.  
  7. namespace ConsoleApp10
  8. {
  9. class Program
  10. {
  11.  
  12. static void Main(string[] args)
  13. {
  14.  
  15. Console.WriteLine("===== Меню ==================");
  16. Console.WriteLine("1. Присвоить или сменить ФИО");
  17. Console.WriteLine("2. Сменна пароля");
  18. Console.WriteLine("3. Просмотр данных акаунта");
  19. Console.WriteLine("4. Exit");
  20. Console.WriteLine("Ввидите пароль для продолжения работы");
  21. string Password = Console.ReadLine();
  22.  
  23. while (true)
  24. {
  25. Console.WriteLine("Ввидите команду");
  26. string user = Console.ReadLine();
  27.  
  28. switch (user)
  29. {
  30. case "1":
  31. Console.WriteLine("Ввидите ваше имя");
  32. string Name = Console.ReadLine();
  33. Console.WriteLine("Хотите указать Фамимлию");
  34. string Name1 = Console.ReadLine();
  35. switch (Name1)
  36. {
  37. case "Да":
  38. Console.WriteLine("Введите Фамилию");
  39. string Name2 = Console.ReadLine();
  40. break;
  41. case "Нет":
  42. Console.WriteLine("Хорошо");
  43. break;
  44. default:
  45. break; ;
  46. }
  47. break;
  48. case "2":
  49. int UserTry = 5;
  50. Console.WriteLine("Для смены пароля Введите старый пароль");
  51. while (UserTry-- > 0)
  52. {
  53.  
  54. Console.WriteLine("Введите пароль");
  55. string UserPassword = Console.ReadLine();
  56.  
  57.  
  58. if (UserPassword == Password)
  59. {
  60.  
  61. Console.WriteLine("Ввидите новый пароль");
  62. string Password1 = Console.ReadLine();
  63. Password = Password1;
  64. break;
  65. }
  66. else
  67. {
  68. Console.WriteLine("Не-а");
  69. Console.WriteLine(UserTry + "попыток осталось");
  70. }
  71. if (UserTry < 0)
  72. {
  73. Console.WriteLine("Попытайтесь ввести пароль позже");
  74. break;
  75. }
  76.  
  77. }break;
  78. }
  79. if(user == "4")
  80. {
  81. Console.WriteLine("Пока");
  82. break;
  83. }
  84. }
  85.  
  86. }
  87.  
  88. }
  89.  
  90.  
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement