如果是大寫,傳回非零值,否則為零。
#include <iostream>
#include <string>
using namespace std;
//-----------------------
int main()
{
char a = 'a' ;
char A = 'A' ;
cout << isupper(a) << endl ;
cout << isupper(A) << endl ;
system("pause");
return 0;
}
執行結果
全站熱搜
如果是大寫,傳回非零值,否則為零。
#include <iostream>
#include <string>
using namespace std;
//-----------------------
int main()
{
char a = 'a' ;
char A = 'A' ;
cout << isupper(a) << endl ;
cout << isupper(A) << endl ;
system("pause");
return 0;
}
執行結果