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.IsDigit(str[i])) Console.Write(" digit"); Console.WriteLine(); } } }
T is h is i is s is is i is s is is a is is t is e is s is t is . is is $ is 2 is digit 3 is digit