using System;
using System.Collections.Generic;
class Program
{
public static void Main()
string name = "James";
string guess = "";
for (int attempts=3; attempts > 0; attempts -= 1)
Console.WriteLine("Guess what my name is?: ");
guess = Console.ReadLine();
if (guess == name)
if (attempts >= 3)
attempts = 1;
}
Console.WriteLine($"Yes, my name is {name}. You guessed my name in {attempts} tries");
else
Console.WriteLine($"Sorry, my name is not {guess}. You have {attempts} more tries");