解题思路:
注意事项:
参考代码:
#include<stdio.h>
#include<string.h>
#define Long 80//允许输入字符串长度
int main()
{
void telegraph_decrypt(char* telegraph, int n);
char telegraph[Long];
gets_s(telegraph, Long);
telegraph_decrypt(telegraph, strlen(telegraph));
printf("%s", telegraph);
return 0;
}
void telegraph_decrypt(char * telegraph,int n)
{
int i;
for (i=0; i < n; i++)
{
if (*(telegraph + i) >= 'a' && *(telegraph + i) <= 'y')*(telegraph + i)=*(telegraph + i) + 1;
else if (*(telegraph + i) == 'z')*(telegraph + i) = *(telegraph + i) - 25;
}
}
0.0分
0 人评分
钟神赛车 (C++代码)浏览:866 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:466 |
矩形面积交 (Java代码)浏览:1222 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:436 |
C语言训练-计算1~N之间所有奇数之和 (C语言代码)浏览:655 |
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)浏览:734 |
字符串问题 (C语言代码)浏览:1521 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:674 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:575 |
求组合数 (C语言代码)浏览:1159 |