Advertisement
denchik22

2.9

Aug 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 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 ConsoleApplication3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string name;
  14. int old;
  15. string shcool;
  16. int number;
  17.  
  18. Console.WriteLine("Привет, как тебя зовут?");
  19. name = Console.ReadLine();
  20. Console.WriteLine("Привет, " + name + "! \nСколько тебе лет?");
  21. old = Convert.ToInt32(Console.ReadLine());
  22.  
  23. if (old >= 18)
  24. {
  25. Console.WriteLine("Замечательно! Ты ходишь в школу?");
  26. shcool = Console.ReadLine();
  27. switch (shcool)
  28. {
  29. case "да":
  30. Console.WriteLine("Обманщик, тебе нет 18!");
  31. Console.ReadKey();
  32. break;
  33. case "нет":
  34. Console.WriteLine("Сентябрь гориииит...\n 1) Убийца плачет\n 2) Птица парит\n 3) Что это вообще такое?");
  35. number = Convert.ToInt32(Console.ReadLine());
  36. switch (number)
  37. {
  38. case 1:
  39. Console.WriteLine("Блеск! Ты прошёл мой тест!");
  40. Console.ReadKey();
  41. break;
  42. case 2:
  43. Console.WriteLine("Обманщик!");
  44. Console.ReadKey();
  45. break;
  46. case 3:
  47. Console.WriteLine("Обманщик!");
  48. Console.ReadKey();
  49. break;
  50. }
  51. break;
  52.  
  53. }
  54.  
  55.  
  56. }
  57. else
  58. {
  59. Console.WriteLine("Извини, но тебе закрыт доступ к программе!");
  60. Console.ReadKey();
  61. }
  62.  
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement