Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Leson01
- {
- class Program
- {
- static void Main(string[] args)
- {
- string setName;
- string setSurname;
- string setAge;
- string setPassword;
- string secretPhrase = "1 + 1 = 3";
- string exc;
- string commandUser;
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- while (commandUser != "Esc")
- {
- if (commandUser == "/help")
- {
- Console.WriteLine("/Setname - установить свое имя");
- Console.WriteLine("/Setsurname - установить свою фамилию");
- Console.WriteLine("/Setage - установить свой возраст");
- Console.WriteLine("/Setpassword - установить свой пароль");
- Console.WriteLine("/Showsecretphrase - установить свою секретную фразу");
- Console.WriteLine("/Esc - выход из программы");
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- }
- else if (commandUser == "/Setname")
- {
- Console.WriteLine("Установите свое имя");
- setName = Console.ReadLine();
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- }
- else if (commandUser == "/Setsurname")
- {
- Console.WriteLine("Установите свою фамилию");
- setSurname = Console.ReadLine();
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- }
- else if (commandUser == "/Setage")
- {
- Console.WriteLine("Установите свой возраст");
- setAge = Console.ReadLine();
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- }
- if (commandUser == "/Setpassword")
- {
- Console.WriteLine("Установите свой пароль");
- setPassword = Console.ReadLine();
- Console.WriteLine("Видите команду или видите команду /help");
- commandUser = Console.ReadLine();
- if (commandUser == "/Showsecretphrase")
- {
- if (commandUser == setPassword)
- {
- Console.WriteLine("ваша секретная фраза" + secretPhrase);
- }
- else
- {
- Console.WriteLine("Вы вели неправленый пароль");
- }
- }
- }
- else if (commandUser == "/Esc")
- {
- Console.WriteLine("Установите свой пароль");
- exc = Console.ReadLine();
- }
- }
- Console.WriteLine("Вы вышли из программы");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment