电码加密

电码加密

#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ˆ﹡ )

猜你喜欢

转载自blog.csdn.net/qq_51932922/article/details/112971873