题解 | #密码翻译#

密码翻译

https://www.nowcoder.com/practice/136de4a719954361a8e9e41c8c4ad855

#include <stdio.h>
#include <string.h>

int main() {
    char s[90];
    while (gets(s)) {
        int len=strlen(s);
        for (int i=0; i<len; i++) {
            if (s[i]==' ') {
                continue;
            }
            else if (s[i]>='a'&&s[i]<'z'||s[i]>='A'&&s[i]<'Z') {
                s[i]+=1;
            }else if (s[i]=='z'||s[i]=='Z') {
                s[i]-=25;
            }
        }
        printf("%s\n",s);
    }
    return 0;
}

全部评论

相关推荐

真烦好烦真烦:豆包润色了自己没看看吗,再说了,都说豆包是愚蠢且勤快的大学生,ds才是聪明的研究生,怎么敢让豆包写论文的
你们的毕业论文什么进度了
点赞 评论 收藏
分享
自学java狠狠赚一...:骗你点star的,港卵公司,记得把star收回去
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务