实验10 指针2
/* 密碼變換問題 */
#include<stdio.h>
#include<string.h>
#define MAXLINE 80
void encrypt(char*);
int main(void)
{char line[MAXLINE];printf("輸入字符串");gets(line);encrypt(line);printf("%s%s\n","After being encrypted:",line);return 0;
}
void encrypt(char*s)
{for(;*s!='\0';s++)if(*s=='z')*s='a';else*s=*s+1;
}
?
轉載于:https://www.cnblogs.com/shenyunwen/p/3422604.html
總結
- 上一篇: Qt绘制不规则窗体
- 下一篇: php锁定文本框内容的方法