Не видно картинки 1, а 2 в плохом качестве.
Объяснение:
using System;
namespace ConsoleApp4
{
class Program
{
static void Main()
{
int attempts = 1;
Random r = new Random();
int x = r.Next(11);
Console.WriteLine("Ok. I made a guess. Now you have 3 attempts.");
for (int i=0; i < 3; ++i)
{
Console.WriteLine($"Attepmt #{attempts}");
if (int.Parse(Console.ReadLine()) == x)
{
Console.WriteLine($"Congrutialations! You got it!\nIt really was number: {x}\nAttempts passed: {attempts}\nTry again? y/n");
if (Console.ReadLine() == "y")
{
Console.Clear();
Main();
return;
}
return;
}
Console.WriteLine("Nope.");
attempts++;
}
Console.WriteLine($"You lose.\nIt was: {x}\nTry again? y/n", x);
if (Console.ReadLine() == "y")
{
Console.Clear();
Main();
return;
}
}
}
}
первый это движение второй это голос
И еще у тебя качество плохое
Объяснение: