Advertisement
Vadim_Rogulev

Untitled

Apr 12th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.26 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 Загадка
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             do
  14.             {
  15.                 Console.WriteLine("Что это такое: синий, большой, с рогами и набит зайцами?");
  16.                 string Sl = Console.ReadLine();
  17.                 switch (Sl)
  18.                 {
  19.                     case "троллейбус":
  20.                         Console.Clear();
  21.                         Console.WriteLine($"Правильно это {Sl}");
  22.                         Console.ReadKey();
  23.                         return;
  24.                     case "сдаюсь":
  25.                         Console.Clear();
  26.                         Console.WriteLine("Правильный ответ троллейбус");
  27.                         Console.ReadKey();
  28.                         return;
  29.                     default:
  30.                         Console.Clear();
  31.                         Console.WriteLine("Подумай еще");
  32.                         Console.ReadKey();
  33.                         break;
  34.                 }
  35.             } while (true);
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement