1 条题解

  • 0
    @ 2025-4-14 18:45:32

    C :

    #include <stdio.h>
    
    int main()
    {
    	char str;
    	scanf("%c",&str);
    	printf("%c",(str>=65&&str<97)?str:str-32);
    	
    	return 0;
    }
    

    C++ :

    #include<iostream>
    using namespace std;
    
    int main()
    {
    	char c,d;
    	cin>>c;
        d=(c>='a'&&c<='z')?c-32:c;
    	cout<<d<<endl;
    	return 0;
    }
    
    • 1

    信息

    ID
    3592
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者