Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp84
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string name;
  10. byte age;
  11. string someData = null;
  12.  
  13. Console.WriteLine("Привет, как тебя зовут?");
  14. name = Console.ReadLine();
  15.  
  16. Console.WriteLine("Привет " + name + "! Сколько тебе лет?");
  17. age = Convert.ToByte(Console.ReadLine());
  18.  
  19. if (age < 18)
  20. {
  21. Console.WriteLine("Извини, но тебе закрыт доступ к программе");
  22. }
  23. else
  24. {
  25. Console.WriteLine("Замечательно! Ты ходишь в школу? Введите в формате Да/Нет");
  26. someData = Console.ReadLine();
  27.  
  28. if (someData == "Нет")
  29. {
  30. Console.WriteLine("Сентябрь горииит...");
  31. Console.WriteLine(" 1. Убийца плачет");
  32. Console.WriteLine(" 2. Птица парит");
  33. Console.WriteLine(" 3. Что это вообще такое?");
  34. Console.WriteLine("Выбери номер. Введите в формате 1/2/3");
  35.  
  36. someData = Console.ReadLine();
  37.  
  38. if (someData == "1")
  39. {
  40. Console.WriteLine("Блеск! Ты прошел мой тест!");
  41. }
  42. else if (someData == "3" || someData == "2")
  43. {
  44. Console.WriteLine("Обманщик");
  45. }
  46. else
  47. {
  48. Console.WriteLine("Вы ввели не корректные данные !!! Доступ запрещен !!!");
  49. }
  50. }
  51. else if (someData == "Да")
  52. {
  53. Console.WriteLine("Обманшик, тебе нет 18!");
  54. }
  55. else
  56. {
  57. Console.WriteLine("Вы ввели не корректные данные !!! Доступ запрещен !!!");
  58. }
  59. }
  60. }
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement