题解 | #密码翻译#

密码翻译

https://www.nowcoder.com/practice/136de4a719954361a8e9e41c8c4ad855

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string intput_str;

	while (getline(cin,intput_str))
	{
		for (int i = 0; i < intput_str.size(); i++)
		{
			char temp = intput_str[i];
			if (temp >= 'a' && temp <= 'z')
			{
				int move_index = ((temp - 'a') + 1) % 26;
				temp = 'a'+move_index;
			}
			if (temp >= 'A' && temp <= 'Z')
			{
				int move_index = ((temp - 'A') + 1) % 26;
				temp = 'A' + move_index;
			}
			cout << temp;
		}
	}

}

全部评论

相关推荐

牛马人的牛马人生:等等吧 说不定现在人太多了不急海投就行
点赞 评论 收藏
分享
沐芷凌曦:这简历数分别指望了,数分最基本的SQL能力你的经历是完全没办法佐证的,而且简历排版极其混乱。你的奖项为什么要写具体的项目内容;教育经历为什么要写你在什么课学到了什么东西,这些都应该是在专业技能里的;专业技能里你又把项目的内容放了进来,而且专业技能你又在强调ETL,如果说你确定要把ETL作为你专业技能的主体那你的经历为什么不能重点佐证呢;反而项目经历你项目等于你调用PyEcharts做了一个看板,就是最基本的课程设计,也是没办法佐证你对PyEcharts的掌握程度,而且没有说具体用什么技术做了什么东西中间做了什么最终得到了什么结果。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务