小写转变为大写函数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;
}

 

posted @ 2020-07-23 23:21  miao-xixixi  阅读(423)  评论(0编辑  收藏  举报