static void Main(string[] args)
{
char ch, c;
Console.WriteLine("请输入一个字符;");
ch = char.Parse(Console .ReadLine ());
if ((ch >= ‘A‘) && (ch <= ‘Z‘))
c = (char)(ch + 32);
else
c = ch;
Console.WriteLine("转化后的字符是:{0}",c);
Console.Read();
Console.ReadLine();
}
大写字符转换为小写字符
时间: 2024-10-22 14:22:59