ctype

#include<iostream>
#include<cctype>
using namespace std;
int main()
{
	char c1='a';
	char c2='1';
	if(isalpha(c1)!=0)
		cout<<"yes"<<endl;
	if(isalpha(c2)==0)
		cout<<"no"<<endl;
	if(isdigit(c2)!=0)
	cout<<"yes"<<endl;
	if(isdigit(c1)==0)
		cout<<"no"<<endl;
	c2=toupper(c1);
	cout<<c2<<endl;
	c1=tolower(c2);
	cout<<c1<<endl;
	system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_43838785/article/details/89296714