instead of using a switch statement you can use the ASCII value of the character
void ROT13(char *text) { for(;*text;text++) { if(*text>'A'&&*text<'N'||*text>'a'&&*text<'n')*text+=13; else if(*text>'M'&&*text<'Z'||*text>'m'&&*text<'z')*text-=13; } }