|
Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the alphabet. More...
#include <stdio.h>#include <string.h>#include <assert.h>Functions | |
| void | rot13 (char *s) |
| for IO operations | |
| static void | test () |
| Self-test implementations. | |
| int | main () |
| Main function. | |
ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the alphabet.
ROT13 transforms a piece of text by examining its alphabetic characters and replacing each one with the letter 13 places further along in the alphabet, wrapping back to the beginning if necessary. A becomes N, B becomes O, and so on up to M, which becomes Z, then the sequence continues at the beginning of the alphabet: N becomes A, O becomes B, and so on to Z, which becomes M.
| int main | ( | void | ) |
| void rot13 | ( | char * | s | ) |
for IO operations
for string operations for assert
Apply the ROT13 cipher
| s | contains the string to be processed |
|
static |
Self-test implementations.