using System;
class MainClass {
public static void Main() {
string str = "This is a test. $23";
int i;
for(i=0; i < str.Length; i++) {
Console.Write(str[i] + " is");
if(Char.IsLetter(str[i]))
Console.Write(" letter");
Console.WriteLine();
}
}
}
Output
T is letter
h is letter
i is letter
s is letter
is
i is letter
s is letter
is
a is letter
is
t is letter
e is letter
s is letter
t is letter
. is
is
$ is
2 is
3 is