标签:alt == main 字符 ring 输入 return mamicode 加密
#include <string> #include <iostream> //循环加密 int main(){ string str; //获取一行输入,getline(输入方式,存入哪里) while(getline(cin,str)){ //遇到特定输入,跳出循环 if(str == "END"){ break; } getline(cin,str); for(int i = 0; i < str.size();i++){ str[i] =(str[i] - ‘A‘ - 5 + 26) % 26 + ‘A‘; } cout<<str<<endl; getline(cin,str); } return 0; }
标签:alt == main 字符 ring 输入 return mamicode 加密
原文地址:https://www.cnblogs.com/juanzhi/p/12956927.html