小写转变为大写函数toupper()

1.头文件

#include<cctype>

2.函数原型

int toupper(int c);

3.用法

#include<cstdio> 
#include<cctype>
#include<iostream>
using namespace std;
int main(){
    char a;
    cin>>a;
    cout<<char(toupper(a))<<endl;
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/miao-xixixi/p/13369545.html
今日推荐