阅读给定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.
输出数据
代码编辑器 加载中...
测试用例(F10) 运行测试(F11) 提交答案(F12)
测试用例输入
{{resultStatus.text}}