#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
char n[101];
int main(){
	gets(n);
	for(int i=0;i<strlen(n);++i)
	{
		strupr(&n[i]);
	}
	cout<<n;
	return 0;
}

1 comments

  • @ 2025-1-18 14:56:18

    同问,

    #include<bits/stdc++.h>
    using namespace std;
    string a,t;
    int n,u;
    char f(char x){
    	if(x>='a'&&x<='z'){
    		x-=32;
    	}
    	return  x;
    } 
    int main(){
    
    	cin>>a;
    	u=a.length();
    	for(int i=0;a[i];i++){
    		cout<<f(a[i]);
    	}
    	cout<<endl;
    		return 0;
    	}
    
    
    • 1

    Information

    ID
    624
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    # Submissions
    115
    Accepted
    47
    Uploaded By