#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define TAM_ALFABETO 26
int main(int argc, char** argv) {
char nome[100];
int teste, i;
printf("Voce quer deslocar a quantas posicoes para a direita:\n");
for(i
= 0; i
< strlen(nome
); i
++) { if (nome[i] >= 'a' && nome[i] <= 'z'){ //se é minuscula
nome[i] = (nome[i] + teste - 'a') % TAM_ALFABETO + 'a';
}
else {
nome[i] = (nome[i] + teste - 'A') % TAM_ALFABETO + 'A';
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPGN0eXBlLmg+CgojZGVmaW5lIFRBTV9BTEZBQkVUTyAyNgoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7CgljaGFyIG5vbWVbMTAwXTsKCWludCB0ZXN0ZSwgaTsKCXByaW50ZigiSW5mb3JtZSB1bSBub21lOlxuIik7CglzY2FuZigiJXMiLCBub21lKTsKCXByaW50ZigiVm9jZSBxdWVyIGRlc2xvY2FyIGEgcXVhbnRhcyBwb3NpY29lcyBwYXJhIGEgZGlyZWl0YTpcbiIpOwoJc2NhbmYoIiVkIiwgJnRlc3RlKTsKCglmb3IoaSA9IDA7IGkgPCBzdHJsZW4obm9tZSk7IGkrKykgewoJCWlmIChub21lW2ldID49ICdhJyAmJiBub21lW2ldIDw9ICd6Jyl7IC8vc2Ugw6kgbWludXNjdWxhCiAgICAgICAgICAgIG5vbWVbaV0gPSAobm9tZVtpXSArIHRlc3RlIC0gJ2EnKSAlIFRBTV9BTEZBQkVUTyArICdhJzsKCQl9CgkJZWxzZSB7CiAgICAgICAgICAgIG5vbWVbaV0gPSAobm9tZVtpXSArIHRlc3RlIC0gJ0EnKSAlIFRBTV9BTEZBQkVUTyArICdBJzsKCQl9Cgl9CgoJcHJpbnRmKCIlc1xuIiwgbm9tZSk7CglyZXR1cm4gMDsKfQo=