• 2021-04-14 问题

    为了防止信息被别人轻易窃取,需要把电码明文通过加密的方式变换成密文。变换规则如下:小写字母z变成a,其他字母变换成该字母ASCII码顺序后一位字母,比如o变换成p.要求:补充encrypt()函数 #include #include #define MAXLINE 100 void encrypt(char *); /*密码变换问题*/ int main() { char line[MAXLINE]; printf("Input the string:"); gets(line); encrypt(line); printf("After being encrypted: "); puts(line); return 0; } void encrypt(char*s) { }

    为了防止信息被别人轻易窃取,需要把电码明文通过加密的方式变换成密文。变换规则如下:小写字母z变成a,其他字母变换成该字母ASCII码顺序后一位字母,比如o变换成p.要求:补充encrypt()函数 #include #include #define MAXLINE 100 void encrypt(char *); /*密码变换问题*/ int main() { char line[MAXLINE]; printf("Input the string:"); gets(line); encrypt(line); printf("After being encrypted: "); puts(line); return 0; } void encrypt(char*s) { }

  • 1