Расшифровка на C ⇐ C++
-
Anonymous
Расшифровка на C
My Decryption Code Don't Handel the Format properly
for example
I taste a liquor never brewed ΓÇô From Tankards scooped in Pearl ΓÇô Not all the Frankfort Berries Yield such an Alcohol!
Inebriate of air ΓÇô am I ΓÇô And Debauchee of Dew ΓÇô Reeling ΓÇô thro' endless summer days ΓÇô From inns of molten Blue ΓÇô
When "Landlords" turn the drunken Bee Out of the Foxglove's door ΓÇô When Butterflies ΓÇô renounce their "drams" ΓÇô I shall but drink the more!
Till Seraphs swing their snowy Hats ΓÇô And Saints ΓÇô to windows run ΓÇô To see the little Tippler Leaning against the ΓÇô Sun!
It doesn't Handel ΓÇô and ΓÇÖ
Here is my Code
#include #include #include #include #include #include #include #define MAX 10240 #define MAX_WORD_COUNT 60000 //we have less than 60000 words #define MAX_WORD_LENGTH 80 //each word is less than 80 letters char words[MAX_WORD_COUNT][MAX_WORD_LENGTH]; //2-d array to hold all the words int word_count = 0; //number of words, initialized to 0 void read_file_to_array(char *filename) { FILE *fp; //open the file for reading fp = fopen(filename, "r"); if (fp == NULL) { printf("Cannot open file %s.\n", filename); exit(-1); } // Read words from file into the array while (fscanf(fp, "%s", words[word_count]) == 1 && word_count < MAX_WORD_COUNT) { // Increment word_count after successfully reading a word word_count++; // Check if word_count exceeds the maximum limit if (word_count >= MAX_WORD_COUNT) { printf("Maximum word count exceeded.\n"); break; } } fclose(fp); } int in_dict(char *word) { int left = 0; int right = word_count - 1; while (left > shift) & 0xFF); // Check for specific characters and insert them into decrypted string if (decrypted_char == '`') { decrypted[insert_index++] = '\''; } else if (decrypted_char == 0x97) { decrypted[insert_index++] = '—'; } else if (decrypted_char == '\n') { // Insert line break decrypted[insert_index++] = '\n'; } else if (decrypted_char >= 32 && decrypted_char
Источник: https://stackoverflow.com/questions/781 ... ption-in-c
My Decryption Code Don't Handel the Format properly
for example
I taste a liquor never brewed ΓÇô From Tankards scooped in Pearl ΓÇô Not all the Frankfort Berries Yield such an Alcohol!
Inebriate of air ΓÇô am I ΓÇô And Debauchee of Dew ΓÇô Reeling ΓÇô thro' endless summer days ΓÇô From inns of molten Blue ΓÇô
When "Landlords" turn the drunken Bee Out of the Foxglove's door ΓÇô When Butterflies ΓÇô renounce their "drams" ΓÇô I shall but drink the more!
Till Seraphs swing their snowy Hats ΓÇô And Saints ΓÇô to windows run ΓÇô To see the little Tippler Leaning against the ΓÇô Sun!
It doesn't Handel ΓÇô and ΓÇÖ
Here is my Code
#include #include #include #include #include #include #include #define MAX 10240 #define MAX_WORD_COUNT 60000 //we have less than 60000 words #define MAX_WORD_LENGTH 80 //each word is less than 80 letters char words[MAX_WORD_COUNT][MAX_WORD_LENGTH]; //2-d array to hold all the words int word_count = 0; //number of words, initialized to 0 void read_file_to_array(char *filename) { FILE *fp; //open the file for reading fp = fopen(filename, "r"); if (fp == NULL) { printf("Cannot open file %s.\n", filename); exit(-1); } // Read words from file into the array while (fscanf(fp, "%s", words[word_count]) == 1 && word_count < MAX_WORD_COUNT) { // Increment word_count after successfully reading a word word_count++; // Check if word_count exceeds the maximum limit if (word_count >= MAX_WORD_COUNT) { printf("Maximum word count exceeded.\n"); break; } } fclose(fp); } int in_dict(char *word) { int left = 0; int right = word_count - 1; while (left > shift) & 0xFF); // Check for specific characters and insert them into decrypted string if (decrypted_char == '`') { decrypted[insert_index++] = '\''; } else if (decrypted_char == 0x97) { decrypted[insert_index++] = '—'; } else if (decrypted_char == '\n') { // Insert line break decrypted[insert_index++] = '\n'; } else if (decrypted_char >= 32 && decrypted_char
Источник: https://stackoverflow.com/questions/781 ... ption-in-c
Мобильная версия