代换加密

时间:2020-03-23 09:56:34   收藏:0   阅读:54
#include "stdafx.h"
#include "iostream"
using namespace std;
#include "string"

char a[26]={d,l,r,y,v,o,h,e,z,x,w,p,t,b,g,f,j,q,n,m,u,s,k,a,c,i};//代换表

void fuc(string s)
{
    for(int i=0;i<s.size();i++)
        s[i]=a[s[i]-65];
    cout<<s<<endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
    string s="MGZVYZLGHCMHJMYXSSFMNHAHYCDLMHA";
    fuc(s);
    return 0;
}

 

原文:https://www.cnblogs.com/butchert/p/12550022.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!