UVA 458

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=399

这题不太理解,只单纯把上面字母对应的ascii码减去下面的,得到差值,然后,依次得到结果

View Code
 1 #include<stdio.h>
 2 void zhuanhua(char *s)
 3 {
 4  while(*s)
 5     {
 6      (*s)=(*s)-7;
 7      s++;
 8     }
 9 }
10 int main()
11 {
12  char str[100000];
13  while(gets(str))
14       {
15        zhuanhua(str);
16        printf("%s\n",str);
17       }
18  return 019 }

 

posted @ 2013-02-18 14:51  执着追求的IT小小鸟  阅读(55)  评论(0编辑  收藏  举报