您的位置:首页 > 理论基础 > 数据结构算法

[Coursera]数据结构基础_Week3_栈与队列_Q1

2015-12-23 14:27 435 查看
#include <iostream>
#include <string.h>
#include <string>
using namespace std;

int main()
{
int N;
cin >> N;
cin.get();
while (N--)
{
char s;
s=cin.get();
while (s != '\n') {
if (s >= 'a'&&s <= 'y')
s += 1;
else if (s >= 'A'&&s <= 'Y')
s += 1;
else if (s == 'z')
s = 'a';
else if (s == 'Z')
s = 'A';
cout << s;
s=cin.get();
}
cout << endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: