标签:bsp string int 凯撒 size oid main 密码 crc
#include "stdafx.h" #include "iostream" using namespace std; #include "string" void func1(string &s1,int x) { for(int i=0;i<s1.size();i++) s1[i]=(s1[i]-97+x)%26+65; } void func2(string s1,int x) { for(int i=0;i<s1.size();i++) s1[i]=(s1[i]-65-x+26)%26+97; cout<<s1<<endl; } int _tmain(int argc, _TCHAR* argv[]) { string s1="JBCRCLQRWCRVNBJENBWRWN"; //cin>>s1; //func1(s1,0); for(int i=0;i<27;i++) { func2(s1,i); } return 0; }
标签:bsp string int 凯撒 size oid main 密码 crc
原文地址:https://www.cnblogs.com/butchert/p/12550027.html