25
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
Console.Write("Enter a character: ");
8
char c = (char)Console.ReadLine()[0]; // only check the first character
9
if (Char.IsLetter(c))
10
{
11
if (Char.IsLower(c))
12
{
13
Console.WriteLine("The character is lowercase.");
14
}
15
else
16
{
17
Console.WriteLine("The character is uppercase.");
18
}
19
}
20
else
21
{
22
Console.WriteLine("The character isn't an alphabetic character.");
23
}
24
}
25
}
Cached Result