题解 | #判断是不是字母#
判断是不是字母
https://www.nowcoder.com/practice/91a588dd4cd244bfa616f17603ec123c
public class Program{ public static void Main() { string line; while((line=System.Console.ReadLine())!=null) { char alpha = System.Convert.ToChar(line); if((alpha>='a'&&alpha<='z')||(alpha>='A'&&alpha<='Z')) System.Console.WriteLine(alpha+" is an alphabet."); else System.Console.WriteLine(alpha+" is not an alphabet."); }; } }