UVA458编码水题

来源:互联网 发布:nasa气象数据下载 编辑:程序博客网 时间:2024/06/05 15:20
#include<stdio.h>
int main()
{
char s[100];
while(gets(s))
{
for(int i=0;s[i]!='\0';i++)
s[i]-=7;
puts(s);
}
return 0;

}

此题可以自行写个译码函数,寻找规律:

#include <stdio.h>int main(void) {  char s1[] = "1JKJ'pz'{ol'{yhklthyr'vm'{ol'Jvu{yvs'Kh{h'Jvywvyh{pvu5";  char s2[] = "*CDC is the trademark of the Control Data Corporation.";  int i = 0;  while(s1[i] != '\0') {    printf("%4d%4d\n", s1[i], s2[i]);    i++;  }  return 0;}

0 0
原创粉丝点击