1064: 加密字符

来源:互联网 发布:新媒体运营网络课程 编辑:程序博客网 时间:2024/05/19 00:53

1064: 加密字符

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 12165  Solved: 5533

SubmitStatusWeb Board

Description

从键盘输入一批字符,以@结束,按要求加密并输出。

Input

从键盘输入一批字符,占一行,以@结束。

Output

输出占一行 
加密规则: 
1)、所有字母均转换为小写。 
2)、若是字母'a'到'y',则转化为下一个字母。 
3)、若是'z',则转化为'a'。 
4)、其它字符,保持不变。

Sample Input

Kyh520@

Sample Output

lzi520

HINT

Source

*




#include<stdio.h>int main(){    char ch1,ch2;    while(ch2=getchar(),ch2!='@')    {        if(ch2>='A'&&ch2<=  'Z')            ch2+=32;            if(ch2=='z')                ch2='a';            else if(ch2>='a'&&ch2<='y')                ch2+=1;               printf("%c",ch2);    }    return 0;}


原创粉丝点击