using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
Random randomIndex = new Random();
var secret = randomIndex.Next(1, 11);
Console.WriteLine("You have 4 tries to find the secret number, from 1 to 10");
Console.Write("Guess The number: ");
var answer = Convert.ToInt32(Console.ReadLine());
if (answer != secret && i <= 4)
Console.WriteLine("No, try again " + (--tries) +" More tries left");
else if (answer == secret)
Console.WriteLine("You found the secert number");
Console.WriteLine("Game over");