|

楼主 |
发表于 2015-6-9 16:33:50
|
显示全部楼层
/***********************************************
purpose:加密解密
Algorithm: 先加4 后减4 China->Glame****
************************************************/
#include <stdio.h>
#include <stdlib.h>
int main()
{
char a,b,c,d,e;
int passwords;
printf("Please input original content!");
scanf("%d,%d,%d,%d,%d",&a&b&c&d&e);
printf("The content is %c,%c,%c,%c,%c\n",a,b,c,d,e);
a = a+4;
b = b+4;
c = c+4;
d = d+4;
e = e+4;
printf("Please input the passwords!\n");
scanf("%d",&passwords);
if (331414 == passwords)
{
a = a-4;
b = b-4;
c = c-4;
d = d-4;
e = e-4;
printf("The content is %c,%c,%c,%c,%c\n",a,b,c,d,e);
}
else
printf("the wrong passwords!\n");
return 0;
}
已经做出了改变 编辑还是出错,错误指向:scanf("%d,%d,%d,%d,%d",&a&b&c&d&e); |
|