#include <stdio.h>
// x 4 -> b 26 

// A + 1 -> B -> 2번째 
// A + 25 -> Z ->26번째 
// Y -> 25번째 + 4 -> 29번째 -> 3번째
int main() {
    int n;
    char ch;

    scanf("%c %d", &ch, &n);
    

    if (ch >= 'A' && ch <= 'Z') {
        printf("%c", 'A' + ((ch - 'A' + n) % 26));
    }
    else if (ch >= 'a' && ch <= 'z') {
        printf("%c", 'a' + ((ch - 'a' + n) % 26));
    }
    else {
        printf("%c", ch);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: