From e5213ca5fc2cb0f28bab3270eb7ae93b2da6c99f Mon Sep 17 00:00:00 2001 From: manuelthieme Date: Fri, 31 Jan 2020 14:50:55 +0100 Subject: [PATCH] added rot13 --- rot13.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 rot13.c diff --git a/rot13.c b/rot13.c new file mode 100644 index 0000000..d76641f --- /dev/null +++ b/rot13.c @@ -0,0 +1,10 @@ +#include + +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; +}