// Perform the ROT13 algorithm on a string // Completed by // ... (z0000000) // Completed on 2019-??-?? #include #include #include #define MAX_LENGTH 256 // Add your own #defines here void rotate_thirteen(char *string); char rotate_one(char c); void rotate_thirteen(char *string); int strings_equal(char *string1, char *string2); // Add your own function prototypes here int main(int argc, char *argv[]) { // Example tests char test_a[MAX_LENGTH] = "Hello, world!"; rotate_thirteen(test_a); assert(strings_equal("Uryyb, jbeyq!", test_a)); char test_b[MAX_LENGTH] = "abcdefghijklmnopqrstuvwxyz"; rotate_thirteen(test_b); assert(strings_equal("nopqrstuvwxyzabcdefghijklm", test_b)); char test_c[MAX_LENGTH] = "The quick brown fox jumped over the lazy dog."; rotate_thirteen(test_c); assert(strings_equal("Gur dhvpx oebja sbk whzcrq bire gur ynml qbt.", test_c)); // Add your own tests here printf("All tests passed. You are awesome!\n"); return 0; } void rotate_thirteen(char *string) { // YOUR CODE HERE // See: https://en.wikipedia.org/wiki/ROT13 } char rotate_one(char c) { // Use your code from the rotate_one exercise up here return 0; } int strings_equal(char *string1, char *string2) { // Use your code from the strings_equal exercise here return 0; }