Advertisement
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 ConsoleApp5
- {
- class Program
- {
- static void Main(string[] args)
- {
- string zag = "лампочка";
- Console.Write("Привет, отгадай загадку.\nВесит груша нельзя скушать:");
- for (int i = 0; i <= 2; i++)
- {
- string otvet = Console.ReadLine();
- if (otvet == zag)
- {
- Console.WriteLine("Вы выиграли, для выхода из консоли нажмите любую кнопку");
- for (int x = 66; x < 71; x++)
- {
- for (int y = 0; y < 10; y++)
- {
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- }
- }
- for (int x = 65; x < 72; x++)
- {
- for (int y = 2; y < 10; y++)
- {
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- }
- }
- for (int x = 63; x < 74; x++)
- {
- for (int y = 3; y < 9; y++)
- {
- Console.ForegroundColor = ConsoleColor.Yellow;
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- Console.ForegroundColor = ConsoleColor.Gray;
- }
- }
- break;
- }
- else
- {
- Console.Write(" У вас осталось {0} попытки, попробуйте еще раз:", 2 - i);
- }
- if(otvet == "подсказка" || i==2)
- {
- Console.WriteLine("\nЭто лампочка), для выхода из консоли нажмите любую кнопку");
- for (int x = 66; x < 71; x++)
- {
- for (int y = 0; y < 10; y++)
- {
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- }
- }
- for (int x = 65; x < 72; x++)
- {
- for (int y = 2; y < 10; y++)
- {
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- }
- }
- for (int x = 63; x < 74; x++)
- {
- for (int y = 3; y < 9; y++)
- {
- Console.ForegroundColor = ConsoleColor.Yellow;
- Console.SetCursorPosition(x, y);
- Console.Write("#");
- Console.ForegroundColor = ConsoleColor.Gray;
- }
- }
- Console.ReadKey();
- break;
- }
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement