I want the user to press a key from keyboard and want the computer to tell if the key is a alphabet, symbol or a number. But some error is there in the code. Can you point out ?
Console.WriteLine("type a character");
int character = int.Parse(Console.ReadLine());
string type = " ";
if ((character>=48) && (character<=57))
{
type = "integer";
}
else if ((character >= 65) && (character <= 90))
{
type = "uppercase alphabet";
}
else if ((character >= 97) && (character <= 122))
{
type = "lowecase character";
}
else
{
type = "symbol";
}
Console.WriteLine("the type of character that you have entered is " +type);
Console.ReadLine();