#include #include char* obfuscate(char* str, const char* find, const char* replace) { char* original = str; for (const char* pos = NULL; *str; ++str) if ( ( pos = strchr(find, *str)) ) *str = *(replace + (pos - find)); return original; } const char* const find = "iStloEsGTBg"; const char* const repl = "!$+10356789"; #define SZBUFFER 2048 char buffer[SZBUFFER]; //char str[] = "Quien se crea compilador de C, entre aquĆ­ http://www.ioccc.org/"; int main() { // puts( obfuscate(str, "iStloEsGTBg", "!$+10356789") ); while ( fgets(buffer, SZBUFFER, stdin) ) puts( obfuscate(buffer, find, repl) ); return 0; }