C语言程序 5.译密码,如 Hello,world!,译成密码:Lipps,asvph!.

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 18:32:57
C语言程序5.译密码,如Hello,world!,译成密码:Lipps,asvph!.C语言程序5.译密码,如Hello,world!,译成密码:Lipps,asvph!.C语言程序5.译密码,如He

C语言程序 5.译密码,如 Hello,world!,译成密码:Lipps,asvph!.
C语言程序 5.译密码,如 Hello,world!,译成密码:Lipps,asvph!.

C语言程序 5.译密码,如 Hello,world!,译成密码:Lipps,asvph!.
很容易发现有一个规律
非字母就不参加运算,而且H译成密码是L,他们的ASCII码相差4
其它的也一样.
C程序:
char data[12]={"H”,"e","l","l","o",",","w","o","r","l","d","!“};
char pdata[12];
for(int i=0;i='A' && data[i]='a' && data[i]