The question is : Use a while-loop to ask the user for a number between 1 and 10. While the user fails to enter a number between 1 and 10 (inclusive), ask them for another number.
My code so far is:
int i = 0;
Console.WriteLine("Enter a number.");
while (i <= 10)
{
Console.ReadLine();
if (i > 1 && i < 10)
{
Console.ReadLine();
continue;
}
if (i < 1 && i > 10)
{
Console.WriteLine("Enter New Number...");
break;
}
Console.ReadLine();
}
What am I doing wrong?