第19472题
阅读给定C++程序,写出各输入对应的输出结果

阅读程序填写结果:

#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cin>>str;
for(int i=0;i<str.length();i++)
{
if(str[i]>='a' && str[i]<='z')
    str[i]=(str[i]-'a')+'A';
else if(str[i]>='A' && str[i]<='Z')
    str[i]=(str[i]-'A')+'a';
else if(str[i]>='0' && str[i]<='9')
    str[i]=(str[i]-'0'+3)%10+'0';
}
cout<<str<<endl;
return 0;
}
题号 第1题 第2题 第3题 第4题
输入数据 These N92 12+96 This is a pen.
输出数据
提交0次 正确率0.00%
答案解析