题解 | #判断字母#
判断字母
https://www.nowcoder.com/practice/44d2d63103664913bc243d3836b4f341
#include <iostream> using namespace std; int main() { char ch; cin>>ch; if(ch>='A'&&ch<='Z'||ch>='a'&&ch<='z'){ cout<<"YES"<<endl; }else{ cout<<"NO"; } }
65~90为26个大写英文字母的ASCLL码值,97~122为26个小写英文字母的ASCLL码值。