九度 1105
时间:2014-05-12 06:30:08
收藏:0
阅读:232
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
#ifdef ONLINE_JUDGE
#define FINPUT(file) 0
#define FOUTPUT(file) 0
#else
#define FINPUT(file) freopen(file,"r",stdin)
#define FOUTPUT(file) freopen(file,"w",stdout)
#endif
void convert(string &s)
{
for(int i=0;i<s.length();i++)
{
if((s[i]>=‘a‘&&s[i]<=‘z‘))
{
s[i] = ‘z‘ - s[i] + ‘a‘;
}
else if((s[i]>=‘A‘&&s[i]<=‘Z‘))
s[i] = ‘Z‘ - s[i] + ‘A‘;
}
}
int main()
{
FINPUT("in.txt");
FOUTPUT("out.txt");
string s;
while(getline(cin,s))
{
if(s=="!")
break;
convert(s);
cout<<s<<endl;
}
return 0;
}
评论(0)