added rot13
This commit is contained in:
parent
b727aef8b5
commit
e5213ca5fc
1 changed files with 10 additions and 0 deletions
10
rot13.c
Normal file
10
rot13.c
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue