标签:译密码// 将“China”译成密码,密码规律:用原来字母后边第4个字母代替原来的字母。
// 要求:先赋初值,然后分别用putchar和printf输出
#include
int main()
{
char c1 = 'C';
char c2 = 'h';
char c3 = 'i';
char c4 = 'n';
char c5 = 'a';
c1 = c1 + 4;
c2 = c2 + 4;
c3 = c3 + 4;
c4 = c4 + 4;
c5 = c5 + 4;
printf("密码是:%c%c%c%c%c\n",c1,c2,c3,c4,c5);
putchar(c1);
putchar(c2);
putchar(c3);
putchar(c4);
putchar(c5);
putchar('\n');
return 0;
}
标签:译密码
原文:http://blog.csdn.net/zhaoyaqian552/article/details/45220015