代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("请输入一个字符:");
char a=char.Parse(System.Console.ReadLine());
if (a >= 'a' && a < 'z')
{
System.Console.WriteLine("小写字母!");
}
else if (a >= 'A' && a <= 'Z')
{
System.Console.WriteLine("大写字母!");
}
else if (a >= '0' && a <= '9')
{
System.Console.WriteLine("数字!");
}
else
System.Console.WriteLine("其它字符!");
System.Console.Read();
}
}
}
温馨提示:答案为网友推荐,仅供参考