#include <stdio.h>

int main() {
    char c;
    printf("请输入一个小写字母:");
    scanf("%c", &c);
    // 判断输入的是否为小写字母
    if (c < 'a' || c > 'z') {
        printf("输入的不是小写字母!");
        return 0;
    }
    // 循环后移5个位置
    c = (c - 'a' + 5) % 26 + 'a';
    printf("移动后的字母为:%c", c);
    return 0;
}
用c语言制作:接收输入的一个小写字母将字母循环后移动5个位置后输出。如a变为fw变成b。

原文地址: https://www.cveoy.top/t/topic/bH36 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录