added rot13

This commit is contained in:
manuelthieme 2020-01-31 14:50:55 +01:00
parent b727aef8b5
commit e5213ca5fc

10
rot13.c Normal file
View file

@ -0,0 +1,10 @@
#include <stdio.h>
int main(void) {
char user_input;
printf("Bitte beliebigen buchstaben einfügen: ");
scanf("%c", &user_input);
char rot13 = (user_input - 97 + 13) % 26 + 97;
printf("Rot13(%c) = %c\n", user_input, rot13);
return 0;
}