using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入一个字符串");
string str = Console.ReadLine();
char []b= str.ToCharArray();
int up=0, low=0, dig=0, other=0;
for (int i = 0; i < str.Length;i++ )
{
//Console.WriteLine(b[i]);
if ('a' <= b[i]&& b[i] <= 'z')
low++;
else if ('A' <= b[i]&&b[i] <= 'Z')
up++;
else if ('0'<=b[i] && b[i] <= '9')
dig++;
else other++;
}
Console.WriteLine("小写字母有{0}个" ,low);
Console.WriteLine("大写字母有{0}个", up);
Console.WriteLine("数字有{0}个", dig);
Console.WriteLine("其他字符有{0}个", other);
}
}
}