第三题(NOIP2014)
#include<iostream>
#include<string>
using namespace std;
int main() {
string st;
int i,len;
getline(cin,st);
len=st.size();
for(i=0;i<len;i++){
if(st[i]>='a'&&st[i]<='z')
st[i]=st[i]-'a'+'A';
}
cout<<st<<endl;
return 0;
}
- 【判断题】输入的字符串可以是任意字符,包括字母、数字、各类符号甚至中文汉字。
{{ select(1) }}
- 【判断题】如果去掉第10行,输出结果不变。
{{ select(2) }}
- 【判断题】输出结果可以包含小写字母。
{{ select(3) }}
- 【判断题】算法时间复杂度为O(1)。
{{ select(4) }}
- 【选择题】输入Hello,输出的结果是( )。
{{ select(5) }}
- 【选择题】输出的结果不可能是( )。
{{ select(6) }}
- WELCOME
- WELCOME-1
- Welcome
- ELCOME