- #include <stdio.h>
- #include <string.h>
- #define N 20
- int main()
- {
- char num[N] = {'\0'};
- printf("请输入加密源文件:\n");
- scanf("%s",num);
- unsigned long len = strlen(num);
- printf("加密后的文件为:\n");
- for (int i = 0; i < len; i++)
- {
- if (num[i] >= 'a' && num[i] < 'x')
- {
- printf("%c%c%c",num[i] + 1,num[i] + 2,num[i] + 3);
- }
- else
- {
- printf("%c",num[i]);
- }
- }
- printf("\n");
- return 0;
- }
复制代码 |