第八周專案4 字串加密

2021-07-06 04:32:19 字數 761 閱讀 9958

* 檔名稱:h1.cpp

* 完成日期:2023年10月26日

* 版本號:vc6.0

* 問題描述:設計乙個程式,實現加密、解密演算法,將輸入的文字進行加密後輸出,然後進行解密並輸出。

* 輸入描述:加密檔案

* 程式輸出:加密、解密的結果

*/#include

#include

#define maxsize 100             //最多的字元個數

typedef struct

sqstring;

void strassign(sqstring &s,char cstr);    //字串常量cstr賦給串s

void dispstr(sqstring s);   //輸出串

void strassign(sqstring &s,char cstr) //s為引用型引數

知識點總結:串的應用,使用迴圈實現串與串的元素交換。

學習心得:這個程式真的很繞,稍不認真就會出錯。

第八周 專案4 字串加密

檔名稱 main.cpp 作者 王超 完成日期 2015年10月23日 問題描述 字串加密 include include sqstring.h sqstring a,b 用於儲存字元對映表 sqstring encrypt sqstring p q.length p.length return q...

第八周 專案4 字串加密

問題描述 乙個文字串可用事先編制好的字元對映表進行加密。例如,設字元對映表為 abcdefghijklmnopqrstuvwxyz ngzqtcobmuhelkpdawxfyivrsj 則字串 lao he jiao shu ju jie gou 被加密為 enp bt umnp xby uy um...

第八周專案4 字串加密

all right reserved.檔名稱 test.cpp 完成日期 2015年10月26日 版本號 v1.0 問題描述 乙個文字串可用事先編制好的字元對映表進行加密。例如,設字元對映表為 abcdefghijklmnopqrstuvwxyz ngzqtcobmuhelkpdawxfyivrsj...