电码加密
#include<stdio.h>
#include<string.h>
void encrypt(char*s)
{
for(;*s!='\0';s++) //循环
if(*s=='z')//if来判断
*s='a';
else
*s=*s+2;//偏移2位
}
void encrypt(char*);
int main(void)
{
char line[100];//定义
gets (line);//输入字符串
encrypt(line);
printf("%s%s\n",line);
return 0;
}
最近接触c语言不对之处,请多多指正。
在下方留下你的脚步。
( ﹡ˆoˆ﹡ )