#include<stdio.h>
#define max 100
void encrypt(char *);
int main(){
char line[max]={‘0’};
printf(“please input string:”);
gets(line);
encrypt(line);
printf("\n");
printf(“output encrypted:%s\n”,line);
return 0;
}
void encrypt(char *s){
for(;*s!=’\0’;s++){
if(*s==‘z’)
*s=‘a’;
else
*s+=1;
}
}
来源:CSDN
作者:Jpch_
链接:https://blog.csdn.net/Jpch_/article/details/103240806