Code:
class Program
{
static void Main(string[] args)
{
char l;
Console.WriteLine("Press 1, 2, 3, 4, or 5. OR you can press 'f' for something special!");
l = (char)Console.Read();
switch (l)
{
case '1':
{
int q, a = '7';
Console.WriteLine(" (Followed by *** ENTER ***)Enter a number bewtween 0 and 9:");
q = (int)Console.Read();
if (q == a)
{
Console.WriteLine("Correct!");
}
break;
}
case '2':
{
int w, aw = '4';
Console.WriteLine(" (Followed by *** ENTER ***)Enter a number bewtween 0 and 9:");
w = (int)Console.Read();
if (w == aw)
{
Console.WriteLine("Correct!");
}
break;
}
case '3':
{
int e, awn = '2';
Console.WriteLine(" (Followed by *** ENTER ***)Enter a number bewtween 0 and 9:");
e = (int)Console.Read();
if (e == awn)
{
Console.WriteLine("Correct!");
}
break;
}
case '4':
{
int r, awns = '6';
Console.WriteLine(" (Followed by *** ENTER ***)Enter a number bewtween 0 and 9:");
r = (int)Console.Read();
if (r == awns)
{
Console.WriteLine("Correct!");
}
break;
}
case '5':
{
int t, awnse = '9';
Console.WriteLine(" (Followed by *** ENTER ***)Enter a number bewtween 0 and 9:");
t = (int)Console.Read();
if (t == awnse)
{
Console.WriteLine("Correct!");
}
break;
}
case 'f':
{
Console.WriteLine("Happy fathers day tat!");
break;
}
default:
{
Console.WriteLine("Thats.....not valid...");
break;
}
}
}
}
But after you type 1 or 2 or whatever and it says to guess a number it doesnt stop to let you guess, it just keeps going on to the end.