#include <stdio.h>
#include <string.h>
char rot13_enCrypt(char *);
char rot13_enCrypt(char *Message) {
int loops, len;
for(loops = 0, len = strlen(Message); loops <= len; loops++) {
int nr;
if((nr = (int)Message[loops]) <= 90 && nr >= 65)
// So this means the char we are crypting is uppercase char
// We are also checking if the range is against A-Z
printf("%c", (nr <= 77 ? nr+13 : nr-13));
else if(nr >= 97 && nr <= 122)
// So yea its a-z
printf("%c", (nr <= 109 ? nr+13 : nr-13));
else
printf("%c", nr); // So it wasnt A-Za-z
}
return 0;
}
int main() {
char wtf[] = ""
"How can you tell an extrovert \n"
"from an introvert at NSA? Va gur \n"
"ryringbef,gur rkgebireg ybbxf ng gur \n"
"BGURE thl'f fubrf. \n";
int a = rot13_enCrypt(wtf);
return 0;
}